Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Fix issue where focus is stolen from form elements after dropdown shown #6369

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
return;
}

openScope.focusToggleElement();
openScope.isOpen = false;
if (openScope.isOpen) {
openScope.focusToggleElement();
openScope.isOpen = false;
}

if (!$rootScope.$$phase) {
openScope.$apply();
Expand Down