-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Model not updating when Select element is manipulated via arrow keys #4216
Comments
Don't have any problems under Firefox (on Mac OS X) |
Can't reproduce on Firefox |
I originally found the problem while working on my work laptop, which I don't have with me at the moment, not sure the version on that machine. However, I just tried it on my home pc and the same thing is happening. Home pc is running Firefox 24.0, both machines using win 7 64 bit. Edit: Work laptop is also running Firefox 24.0 |
I can reproduce the issue. I did notice that it will update the model if you hit enter or on blur but not until one of those things happen. I tested on Firefox 24.0 on Ubuntu 13.04 x64 Seems to work fine in chrome though. |
This is an issue with Firefox
|
taken from https://bugzilla.mozilla.org/show_bug.cgi?id=126379#c24 :
This plunker shows how to simulate the behavior chrome has: |
This was bothering me too and I went looking for a bug report, but I see now that it updates when the control subsequently loses focus, so I can get behind that behavior. |
This is definitely a browser bug not an angular bug. I think this issue should be closed and people should focus on bugging Mozilla at https://bugzilla.mozilla.org/show_bug.cgi?id=126379 |
We've been able to repeat this on Google Chrome Version 39.0.2171.95 (64-bit) running Angular 1.3.7. The steps to repeat have been:
If you're logging out your scope changes, then you'll notice the value of the To resolve I have simply used the fix described here which works great. http://stackoverflow.com/questions/22630744/ng-options-model-not-updated-when-use-arrow-keyboard-instead-of-mouse |
@joshuapowell: It sounds like this is realated to #9134 (and a bunch of similar issues), which is related to a Chrome bug - has been reported here. |
Thanks @gkalpak |
Not entirely sure if its a good idea to add this here plunker example What I try to demonstrate is; when I tab to my select box and using my keyboard arrow keys to select first option (Chrome) If I tap down arrow key again and select And subsequent tap of up/down arrow keys will update model as expected. Simple click select also update the model as expected. While this is a major issue for me right now. I'd like to make angular team aware of behaviour I am observing for future reference. All previous example display the same behaviour as soon as I comment out default option.
BTW: I am testing with current stable version of AngularJS v1.3.16 and Chrome Version 43.0.2357.124 m |
@iiminov, as already mentioned, this is a known issue and is due to a bug in Chrome. (It is not clear what you are trying to demonstrate (and how it is different from the demos already discussed).) |
@gkalpak, my apologies, I guess I failed to realise that explicit use of empty option was actually a workaround. Thank you for pointing it out. |
Hello, I noticed a bug today. When I use the keyboard to change the selected option in a select element, the angular model is not updated.
This happens both when using arrow keys, and when using alpha keys (first letter of an option in the select element).
Here is a quick plunker to see what I am describing.
http://plnkr.co/edit/gWMxy0HbVhfhmV4jifUJ?p=preview
This works find in Chrome and Internet Explorer, but not in Firefox.
Thanks
The text was updated successfully, but these errors were encountered: