From 761db7b4b7da993fe4f89a83163aa1243113ab24 Mon Sep 17 00:00:00 2001 From: "Alex (Jinghao) Yan" Date: Wed, 18 Jan 2017 11:31:47 +0800 Subject: [PATCH] fix(dropdown): do nothing if not open when clicking - When clicking, do nothing if dropdown is closed on document listener Closes #6414 --- src/dropdown/dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropdown/dropdown.js b/src/dropdown/dropdown.js index a7bd4a01d4..2560e282e8 100644 --- a/src/dropdown/dropdown.js +++ b/src/dropdown/dropdown.js @@ -88,7 +88,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap. var closeDropdown = function(evt) { // This method may still be called during the same mouse event that // unbound this event handler. So check openScope before proceeding. - if (!openScope) { return; } + if (!openScope || !openScope.isOpen) { return; } if (evt && openScope.getAutoClose() === 'disabled') { return; }