Default locale flashes when reloading page
MvRemmerden opened this issue · 3 comments
MvRemmerden commented
When I reload the multi-page example on Netlify, the dropdown menu for selecting the locale flashes the default value.
I'm having the same problem when developing locally, and while the normal translated text is displayed perfectly fine without flashing, I couldn't figure out how to remove the flashing for the locale.
jarda-svoboda commented
Hi @MvRemmerden!
I’m not 100% sure, but I think this one is about browser’s behavior - how it deals with preselected options in select component. For instance, I see no glitches in Safari on iOS.
IMG_0329.MOV
jarda-svoboda commented
Actually you could use selected
option attribute (e.g. selected="{$locale === value}"
) to get rid of this behavior.. it seems that bind:value
does not handle it by default..
jarda-svoboda commented
Fixed in the example