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

fix(dropdown): remove focus trapping when dropdown is closed #6363

Closed

Conversation

mattlewis92
Copy link
Contributor

@mattlewis92 mattlewis92 commented Dec 13, 2016

This revert: c824731 actually removes an extra line that is required to remove the event listeners when the dropdown is closed, the original commit only added one extra line: 44ab0a8

This is a pretty bad regression and broke a lot of our app in a very hard to find way, any chance you could cut a new patch release once this is merged so that is doesn't bite anyone else.

Thanks! 馃槂

Fixes #6357
Fixes #6372
Fixes #6364

@opetriienko
Copy link

opetriienko commented Dec 13, 2016

Hi @mattlewis92 ! I've already tried your fix on my local machine. But anyway I have a problem with jumping page to dropdown. I.e. if I open dropdown then scroll up a lot(when opened dropdown will become invisible in a viewport) and then click on a random place I'll be moved back to dropdown location.
You can observe this behavior right here: https://angular-ui.github.io/bootstrap/#/dropdown
And again... the same is reproducing with this fix. Maybe do you have any ideas about it?

UPD: If I understand correct that is because of this line: "openScope.focusToggleElement()" in closeDropdown method.

@mattlewis92
Copy link
Contributor Author

mattlewis92 commented Dec 13, 2016

@opetriienko this seems like a separate issue. Looking at the code the document click event is triggered here which then focuses the toggle element here which would cause your problem. I'd recommend filing a separate issue to discuss with the maintainers, otherwise it may get lost.

@dougludlow
Copy link
Contributor

@opetriienko you might take a look at e07f9fd to see if that fixes your issue.

@Gusi
Copy link

Gusi commented Dec 21, 2016

Fix e07f9fd works for me

@mattlewis92
Copy link
Contributor Author

Fixed by 955848c

@mattlewis92 mattlewis92 deleted the mattlewis92-dropdown-fix branch December 28, 2016 12:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants