This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-focus and ng-blur does not work on <button> element under Safari and FF browsers #13761
Open
Description
Can't get ng-focus
and ng-blur
directives working on button
element under Safari and FF browsers.
Here is an example to visually reproduce this issue:
<div ng-app ng-init="focus=false;blur=false;active=false">
<button
tabindex="1"
ng-class="{ myFocus: focus, myBlur: blur }"
ng-focus="focus=true;blur=false;"
ng-blur="blur=true;focus=false;"
value="Click me"
>
Click me
</button>
<p>focus: {{focus}}</p>
<p>blur: {{blur}} </p>
</div>
Working example from above can be found here:
http://jsfiddle.net/UTn5y/1196/
Generally using this approach to write a dropdown. Button is used as dropdown list toggle.