When users are allowed to set their own timezone:

If a user without a timezone set (i.e. $user->timezone is empty) goes to his settings page, user/1/edit, the timezone is automatically detected using JavaScript, and the appropriate option is selected in the select box. This is fine. Now, if the user select some other timezone, then enters e.g. an invalid email address and finally submits the form, the form is displayed again filled with the submitted values including the invalid email adress. The timezone dropdown is also initialized to the selected value, but the auto-detection kicks in and changes this immediately, i.e. discards the user's selection. This is bad UX.

This patch skips auto-detection after the form has been submitted.

CommentFileSizeAuthor
timezone-autodetect-1.patch1.42 KBc960657

Comments

matt2000’s picture

Status: Needs review » Reviewed & tested by the community

Good catch.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Makes sense to me. I don't think there's a way to write a test for this since it's JS code making the change.

Committed to HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -quickfix

Automatically closed -- issue fixed for 2 weeks with no activity.