Closed mondayuk closed 7 years ago
I believe this was originally added for accessibility reasons - does this preserve the accessibility situation denoted in #5782?
Yes, the functionality is preserved when the popup closes (which is the intention of the fix) but it resolves the issue that the focus continues to be reverted back to the toggle control even after the popup has been closed.
This issue can be seen on https://angular-ui.github.io/bootstrap/. Click to open the dropdown then close, then try and focus on something else on the page (for example, one of the text boxes next to the date pickers) focus is pulled back to the dropdown.
FYI, @lukehutton added e07f9fd to #6353 to fix the same issue.
Looks like that was done after mine and (unless i'm mistaken) has no pull request yet. Functionally identical though.
Oh actually, I see it is associated with a pull request. No preference on which makes it in.
Going to close this as I merged #6382 instead as the proper fix - thanks for the attempt, the fix should be in the latest release.
Discovered an issue where form elements were losing their focus. Discovered this was related to #5934 having added a feature to apply the focus to the toggle element, but as this event fires on all mouse clicks the focus was being set regardless of whether the dropdown was actually open at the time.