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

Angular messes up events on a select tag #11901

Closed
blittle opened this issue May 18, 2015 · 4 comments
Closed

Angular messes up events on a select tag #11901

blittle opened this issue May 18, 2015 · 4 comments

Comments

@blittle
Copy link

blittle commented May 18, 2015

Steps to reproduce:

  1. Look at http://jsbin.com/xazadekuti/3/edit?html,js,console,output
  2. Click on the empty text input
  3. Tab to the select input
  4. Press "i" key twice
  5. Notice that the second event does not fire (whether logged by angular, jquery, or native).

If I comment out all of the angular code, the event fires correctly. The problem exists in 1.3.x and 1.4.x. I can work around the problem apparently by putting a blank <option></option> tag at the start of the list.

@blittle
Copy link
Author

blittle commented May 18, 2015

Tested in Chrome, FF, and Safari. Broken in Chrome and Safari.

@miraage
Copy link

miraage commented May 19, 2015

Reproduced jsbin example on Chrome 42, Kubuntu 14.04.

@Narretz
Copy link
Contributor

Narretz commented May 25, 2015

Hmm. One thing's weird. If you preselect an option via, say ngModel = 'AL', it also works with angular.

@Narretz
Copy link
Contributor

Narretz commented May 25, 2015

This is a duplicate of #9134. When angular removes the "unknown" option from the DOM, Chrome somehow gets confused and doesn't fire a change event.

@Narretz Narretz closed this as completed May 25, 2015
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

3 participants