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

ngClick issue in IE11 #10980

Closed
ajayparsana opened this issue Feb 5, 2015 · 2 comments
Closed

ngClick issue in IE11 #10980

ajayparsana opened this issue Feb 5, 2015 · 2 comments

Comments

@ajayparsana
Copy link

Hi,

We have written customised checkbox which has divs for square and label.

Issue:Checkbox div has ng-click which should only be fired when clicked on square box but it also get fired if I click on Text next to it in IE11 Version 11.0.9600.16428.

Our implementation is working fine in Chrome and Mozilla but gives above issue when executed in IE11.

Sample Code link: (Please run this code in Chrome & IE11)
http://jsbin.com/luzogucasi/5/edit?html,js,output

@pankajparkar
Copy link

That is only expected behavior, because you used for="k". The for attribute will target the id="k", and whenever you clicked on label it will also fire click event element with id="k"

http://jsbin.com/gikixehazi/1/edit?html,js,output

Remove attribute for="k" will work proper on any browser.

Also take look at.
http://stackoverflow.com/questions/28346733/unwanted-ngclick-gets-fired-in-ie11-browser/28353741#28353741

@ajayparsana
Copy link
Author

Thanks Pankaj.

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

No branches or pull requests

2 participants