Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Angular ng-select bug in Chrome when using tab navigation and no default empty option #4836

Closed
vilmosioo opened this issue Nov 8, 2013 · 17 comments

Comments

@vilmosioo
Copy link

There seems to be a weird bug when selecting values in Chrome on Windows using the keyboard only.

function MyCtrl($scope) {
    $scope.d = '';
    $scope.options = [1,2,3];
    $scope.d2 = '';
    $scope.options2 = [1,2,3];
}

<input><br>
<select ng-options="d for d in options" ng-model="d"></select><br>
<select ng-options="d for d in options2" ng-model="d2"></select><br>
<input>

JSFiddle:
http://jsfiddle.net/DrTCZ/4/

Steps to replicate:

  1. Click on first text field
  2. Press tab
  3. Using the keyboard, select 2
  4. Press tab
  5. Using the keyboard, select 2

Notice the value of the first dropdown.

Any help would be appreciated!

@iox
Copy link

iox commented Nov 20, 2013

I have encountered the same issue. Somehow with Chrome, when using the keyboard in a select it fails the second time. This is a simplified JSFiddle showing the same problem: http://jsfiddle.net/UJkLX/

Reproduced both in Windows Chrome and in Linux Chrome

@ghost ghost assigned tbosch Jan 10, 2014
@tbosch
Copy link
Contributor

tbosch commented Jan 10, 2014

Just tried a fiddle with static selects and it works fine: http://jsfiddle.net/guzGG/2/

So this is a valid bug!

@akanieski
Copy link

  • 1

Noticed this too with Chrome.

@howlettt
Copy link

+1 We're seeing this as well

@callmekatootie
Copy link

Such issues have started cropping up in SO, so mentioning an alternative here in case someone is looking for it - have an option with an empty / null value within the select such as <option value="">Select One</option> and it will work: http://jsfiddle.net/JqnMr/

@yr12345678
Copy link

Thanks callmekatootie, that worked for me. Weird bug.

@btford btford removed the gh: issue label Aug 20, 2014
@camilleriluke
Copy link

Tested it on OSX Chrome Version 36.0.1985.143 and could not reproduce. Can someone please verify that this behaviour is still present?

@iox
Copy link

iox commented Aug 25, 2014

Reproduced in Ubuntu 12.04 with Chromium 36.0.1985.125 and Google Chrome 36.0.1985.125. I used this fiddle to check: http://jsfiddle.net/UJkLX/

@vilmosioo
Copy link
Author

Cannot reproduce on OSX Chrome 36 anymore.

@gkalpak
Copy link
Member

gkalpak commented Sep 21, 2014

Still reproducible with version 1.3.0.-rc.2 on Chrome 37 (Window 8.1).

It might be related to #9134 and only happens when the is no default empty option specified.
If you define an empty option the problem disappears (demo here).

If that is indeed the case, it seems to be a Chrome bug (it's been reported here).

@bernhard-hofmann
Copy link
Contributor

+1, reproduced in Chrome Version 39.0.2171.2 dev-m on Windows.

@bernhard-hofmann
Copy link
Contributor

FWIW, this is a bug in Chrome (IMO) not in Angular. Chrome does not notify Javascript of the selection change. See this jsBin which logs changes to the console: http://jsbin.com/wofejo/1/

@lborgav
Copy link
Contributor

lborgav commented Nov 25, 2014

I had the same issue using Chrome on Windows. Any solution?

@david0603
Copy link

Any eta for this? Thanks.

@vilmosioo
Copy link
Author

This is not an angular bug but a Chrome bug.

@risingfish
Copy link

I believe this is related to this bug: https://code.google.com/p/chromium/issues/detail?id=415505

@Narretz Narretz changed the title Angular ng-select bug in Chrome Windows when using tab navigation Angular ng-select bug in Chrome when using tab navigation and no default empty option Sep 22, 2015
@Narretz
Copy link
Contributor

Narretz commented Apr 11, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests