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

fix(modal): keyboard=false should not stop trapping tab focus. #5005

Closed
wants to merge 6 commits into from

Conversation

wawyed
Copy link
Contributor

@wawyed wawyed commented Dec 3, 2015

Fix for #4990

@wesleycho
Copy link
Contributor

Can you add a test for this? Should be simple, just test when emitting the proper keypress event with event.which being 9, the esc key value, and testing whether it has been defaultPrevented.

@wawyed
Copy link
Contributor Author

wawyed commented Dec 3, 2015

What would you like me to test? keyboard = false is already been tested by https://github.com/angular-ui/bootstrap/blob/master/src/modal/test/modal.spec.js#L747

@wesleycho
Copy link
Contributor

Testing when hitting esc and making sure it isn't getting defaultPrevented normally is what I mean

@wawyed wawyed changed the title fix(modal): keyboard=false should not stop trapping tabbing focus. fix(modal): keyboard=false should not stop trapping tab focus. Dec 3, 2015
@wawyed
Copy link
Contributor Author

wawyed commented Dec 3, 2015

I'm a bit confused with what you mean. What does preventDefault have anything to do with my PR? The only test that I can think of adding would be that the trap focus on tab works correctly even when keyboard=false is used.

@wesleycho
Copy link
Contributor

Ensuring that it isn't prevented is what I meant - the current behavior in master is that it will be prevented when tabbing (I got confused with the keycode heh).

@wawyed
Copy link
Contributor Author

wawyed commented Dec 4, 2015

Made another PR with unit tests, #5010

@wawyed wawyed closed this Dec 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants