-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ng-model does not update displayed select value on Chrome/Android #7986
Comments
Is this Android 4.2.2 specific? |
Actually today it looks even deeper down the stack. Just changing orientation causes the select to display the right value. Same effect has blur. Most likely this is a Chrome rendering bug. |
I have the same issue if I have together on the same page a select and a ng-grid (current version 2.0.11). |
I can submit the following information regarding this bug as we are having the same problem:
Opera also has the same issue, but not Firefox. |
We found our issue. It was that Chrome doesn't change the display value until the object is blured. We solved it by forcing a blur on ng-change. Check if that might be the same issue that's causing your behaviour as well. |
Just in case people don't understand what @theronin means, here is a sample snippet (I am using ng-classify, it's awesome) class ForceBlur extends Directive
# https://github.com/angular/angular.js/issues/7986
constructor: () ->
return {
restrict: "A"
require: 'ngModel'
link: (scope, elem, attrs, ctrl) ->
if ctrl and ctrl.$viewChangeListeners
ctrl.$viewChangeListeners.push () ->
$(elem).blur()
}
|
same issue here, rotating the phone or clicking away seems to help updating select field but thats not an option, @jacekwasowski have you found a good workaround? |
In our case we blur the select on change. |
There is a bug filed with the Chromium project for this at https://code.google.com/p/chromium/issues/detail?id=415505 . The more folks who star it the higher it will bubble up. |
Dupe of #4836 |
Chrome v35.0.1916.141
Android 4.2.2
Angular 1.2.18
When changing the value of select the model is properly updated, however select keeps displaying the old value until it loses focus.
The text was updated successfully, but these errors were encountered: