Last active
August 29, 2015 14:03
-
-
Save mmirolim/9b7f85bf22d944c9d155 to your computer and use it in GitHub Desktop.
Auto focus to popups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Directive to focus autocomplete popover when it shown | |
* @author Mirolim Mirzakhmedov mirolim777 at gmail dot com | |
*/ | |
app.directive('focusPopover', function($timeout) { | |
return function(scope, element) { | |
$timeout(function() { | |
element.focus(); | |
}); | |
} | |
}); | |
// add to popovers | |
focus-popover="true" ng-blur="popover.type = false;popover.style = false; popover = {}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment