-
Notifications
You must be signed in to change notification settings - Fork 27.4k
select changes value when typing into nearby text input #2230
Comments
According to my observations, this is a bug in Chrome, triggered by Angular's removal of the blank item during the first first selection ( Since the cause is the dynamic removal of an option, one possible workaround for you would be to have the empty option always available, with an explicit I'll report this on Chrome's bug tracker with a simpler test case later. |
@mernen Do you have a link to that Chrome bug report by chance? I'd love to keep tabs on that one. Thanks! |
As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months. Please try the newest versions of Angular ( Thanks! |
I have also encountered this issue using angular version 1.2.14 and Chrome version 33.0.1750.149 on Ubuntu 12.04. I can confirm that @mernen's suggestion of adding an explicit empty option fixes this issue for me. |
the bug still happens with both 1.2.0 and 1.2.16 on Chrome Version 33.0.1750.152 when you do not force an empty option: check here: http://plnkr.co/edit/2R9YM6KF01bye4kPeoZL?p=preview EDIT: the bug demonstrated here looks more like #4216 . but the fix described in this issue works, it seems indeed related to the removal on the blank item. |
@Biaib Using the 1.3 beta instead of 1.0.5, in Chrome 33.0.1750.154, i can confirm it is fixed. I have an updated version of the fiddle @stephenhuey used, and used the same steps to replicate the issue. It was an issue in 1.2, but 1.3 fixed it. Check here: http://jsfiddle.net/ADukg/5114/ |
Well, since 1.3 drops supports for IE8, I won't use it. Does that mean 1.2 branch won't get updates once 1.3 comes out ? |
As far as I know, the 1.2 branche will only get bugfixes once 1.3 launches. But that being said, I could not say for sure. But i just updated the jsfiddle to 1.2.16 and it still works: Check here: http://jsfiddle.net/ADukg/5115/ |
@bramslob I think we're not looking at the same problem - my bad, I posted in the wrong issue. If you try to reproduce the scenario described in OP, and check after the ng-model's value, you can see it doesn't get updated on the second "T" keystroke. Try it out: http://jsfiddle.net/ADukg/5116/ hit "TAB" to focus the select, then type "T" twice. The model "person.state" stays to "TN" instead of "TX". |
I see what you mean. It happens only once, but still an annoying problem. And i see that it also does not work in 1.3 beta. I think the best thing to do would be to add a new issue, specifically for your problem. This issue is not completely compatible with your problem. |
This bug is occurring in Chrome (Version 25.0.1364.172) but not in Firefox or Safari. I mentioned it on the Google Group here:
https://groups.google.com/d/msg/angular/4dlx_OSY8uQ/l2prTdNpOEcJ
Here is a simple demo of the problem:
http://jsfiddle.net/ADukg/2148/
My model person has a person.name, a person.state, and a person.phone. I enter a name in the first text input, tab to the state select and hit the letter T twice (choosing TN first and ultimately stopping on TX) and then tab to the next text input, and as I'm typing in the phone number the select mysteriously changes to TN.
Is this a bug in Angular or Chrome? As I said, it's not doing this in Safari or Firefox.
The text was updated successfully, but these errors were encountered: