Fix popover closing on input focus
Signed-off-by: Marin Treselj <marin@pixelipo.com>
This commit is contained in:
@@ -37,7 +37,8 @@ app.directive('appPopoverMenuUtils', function () {
|
||||
e.stopPropagation();
|
||||
});
|
||||
scope.$on('documentClicked', function (scope, event) {
|
||||
if (event.target !== button) {
|
||||
/* prevent closing popover if target has no-close class */
|
||||
if (event.target !== button && !$(event.target).hasClass('no-close')) {
|
||||
menu.addClass('hidden');
|
||||
}
|
||||
button.css('display','');
|
||||
@@ -45,4 +46,3 @@ app.directive('appPopoverMenuUtils', function () {
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div id="popover-controls">
|
||||
<div id="stack-add" ng-if="boardservice.canEdit() && checkCanEdit()">
|
||||
<form class="ng-pristine ng-valid" ng-submit="createStack()">
|
||||
<input type="text" placeholder="Add a new stack"
|
||||
<input type="text" class="no-close" placeholder="Add a new stack"
|
||||
ng-focus="status.addStack=true"
|
||||
ng-blur="status.addStack=false"
|
||||
ng-model="newStack.title" required
|
||||
|
||||
Reference in New Issue
Block a user