You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
If you let the <select> element open, move your cursor to a lower item, wait a few seconds, you will see the highlight cursor moves back to the top as the number on the right changes.
In my application, I have a table and a <select>. Each is bind to a model, but <select> is initialized once whereas the table gets updated every 3 seconds using $timeout (we poll).
In Chrome (Google Chrome 27.0.1453.93 (Official Build 200836)) I don't see this problem.
The text was updated successfully, but these errors were encountered:
Cause of this is a <select> element with ng-optionsrefreshing itself on each loop iteration. The code is careful enough not to completely rebuild the options list, but simply updates items.
However, Firefox updates the <option> elements' selected properties as the user browses the drop-down, causing Angular to try and 'fix' the selection every loop iteration.
Regardless of whether this is a browser bug, a work around is probably possible.
That said, I don't think Firefox is following spec. Here's a quote from the current HTML5 spec on <select>:
If the multiple attribute is absent, and the element is not disabled, then the user agent should allow the user to pick an option element in its list of options that is itself not disabled. Upon this option element being picked (either through a click, or through unfocusing the element after changing its value, or through a menu command, or through any other mechanism), and before the relevant user interaction event is queued (e.g. before the click event), the user agent must set the selectedness of the picked option element to true and then queue a task to fire a simple event that bubbles named change at the select element, using the user interaction task source as the task source.
Foxandxss on IRC helped me to verify this issue.
Try this on Firefox http://plnkr.co/edit/MziozEZq9KBhYsyuZas9?p=preview (I am using FF-23 stable, but other versions should have the same issue)
If you let the
<select>
element open, move your cursor to a lower item, wait a few seconds, you will see the highlight cursor moves back to the top as the number on the right changes.In my application, I have a table and a
<select>
. Each is bind to a model, but<select>
is initialized once whereas the table gets updated every 3 seconds using$timeout
(we poll).In Chrome (Google Chrome 27.0.1453.93 (Official Build 200836)) I don't see this problem.
The text was updated successfully, but these errors were encountered: