chairemobilite / evolution

Online survey platform for travel survey
MIT License
4 stars 9 forks source link

survey: scroll to invalid question instead of trying to focus #741

Closed tahini closed 1 month ago

tahini commented 1 month ago

fixes #740

On Safari on iPhone and iPad, calling the focus method on input elements of type radio or checkbox do not focus on those elements, so if they are out of view, the participant may not see that there are invalid widgets.

Since those widget types cannot really "focus" anyway, we simply use the scrollTo position for all widgets except the text boxes, which work on all known platforms.

tahini commented 1 month ago

Do not merge too fast, needs more testing with more widget types and platforms, but it seems to work on safari/ipad and linux/firefox with radios, maps, checkboxes and textboxes.

tahini commented 1 month ago

Testé sur iPad et desktop et widgets radio, text, checkbox, select, range, map, button et multiselect. Tout fonctionne

samuel-duhaime commented 1 month ago

Très bien, je me suis toujours demandé c'était quoi le problème avec IOs et nos enquêtes. Merci d'avoir découvert.