-
Notifications
You must be signed in to change notification settings - Fork 27.5k
select basic directive bug in firefox #2448
Comments
I am experiencing the same problem in unstable 1.1.4. |
with my fix its working Le 15 mai 2013 à 21:54, Michael Barlow notifications@github.com a écrit :
|
I implemented your change, and it is now working in Firefox 21.0. Thanks! |
Cool I am happy of helping you !! Envoyé de mon iPhone Le 15 mai 2013 à 22:47, Michael Barlow notifications@github.com a écrit :
|
What can we do to have this fix folded in to Angular? This bug has caused me pain in 1.0.7 and boblepepeur's fix works for me, too. |
@mgladdish - very simple - send a pull request with a fix and tests. This is the fastest way of having a bug fix propagated to the AngularJS code base. |
A fix for this would be great. It is a pretty big annoyance on pages with real time data which cause digests very frequently. I made a plunk of the issue: http://embed.plnkr.co/wuKBNc/preview. In firefox open the select box and then hover over any option other than 3. The proposed fix introduces a regression with selects whose models have a value not in the options list. When you change the model value to be the first option the select will display the second options as selected. |
I can still repro this on FF 26 and angular 1.2.8: http://plnkr.co/edit/l8AB62?p=preview |
The fix suggested by @boblepepeur fixes the flicker in the repro, but fails in other ways: If you remove the |
+1 For a long time I was suspecting firefox broke something, but then I didn't encounter the same bug in (of all places!!!) w3schools example, and then I stared to investigate... Never dawned on me that it could be Angular! |
Btw, I'm using Angular 1.2.4, and the bug is still present. |
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes angular#2448
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes angular#2448
I see that the pull request #5994 seems to fix this but has slid a couple of releases. Is there a chance this is going to make it into 1.2.13? |
+1 |
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes angular#2448 Closes angular#5994
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes angular#2448 Closes angular#5994
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes angular#2448 Closes angular#5994
In Firefox, hovering over an option in an open select menu updates the selected property of option elements. This means that when a render is triggered by the digest cycle, and the list of options is being rendered, the selected properties are reset to the values from the model and the option hovered over changes. This fix changes the code to only use DOM elements' selected properties in a comparison when a change event has been fired. Otherwise, the internal new and existing option arrays are used. Closes #2448 Closes #5994 Closes #6769
Hello, i think i found a bug in angular stable version 1.0.4 and unstable 1.1.4
in angular 1.0.4, line 14489 :
if (existingOption.element.selected !== option.selected) {
lastElement.prop('selected', (existingOption.selected = option.selected));
}
you test a bad properties of js option object
firefox rebuild the list every time on you have a bug onmouseover of the select option list
the good code is that :
if (existingOption.selected !== option.selected) {
lastElement.prop('selected', (existingOption.selected = option.selected));
}
The text was updated successfully, but these errors were encountered: