From 239e949caeda7add23b5b50d13a7cb79a731d4bf Mon Sep 17 00:00:00 2001 From: Mihail Maxacov <0xf013@gmail.com> Date: Tue, 13 Jan 2015 14:38:09 +0200 Subject: [PATCH] disable clicking on inputs propagation to body and causing the dropdown to close --- frontend/app/ui_components/has-dropdown-menu-directive.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/app/ui_components/has-dropdown-menu-directive.js b/frontend/app/ui_components/has-dropdown-menu-directive.js index e5d434b0f6..c6d57eee37 100644 --- a/frontend/app/ui_components/has-dropdown-menu-directive.js +++ b/frontend/app/ui_components/has-dropdown-menu-directive.js @@ -106,6 +106,13 @@ module.exports = function($injector, $window, $parse, FocusHelper) { .then(function(element) { menuElement = element; angular.element(element).trap(); + menuElement.on('click', function(e) { + // allow inputs to be clickable + // without closing the dropdown + if (angular.element(e.target).is(':input')) { + e.stopPropagation(); + } + }); }); }