-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Focus is now trapped when modal is opened. It works in both directions with tab or shift+tab. #4004
Conversation
…h directions with tab or shift+tab. Refs: angular-ui#738, angular-ui#3689
Does this work with multiple modals? |
I didn't use with multiple modals, I tested using the main components page. I will create a plunk today and post here. |
It's working!! |
nice, 👍 |
@@ -6,7 +6,7 @@ <h3 class="modal-title">I'm a modal!</h3> | |||
<div class="modal-body"> | |||
<ul> | |||
<li ng-repeat="item in items"> | |||
<a ng-click="selected.item = item">{{ item }}</a> | |||
<a href="#" ng-click="selected.item = item">{{ item }}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this change? I think you should revert this, as I think it would have an adverse effect on the docs page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think I get it - maybe change ng-click to
$event.preventDefault(); selected.item = item
Work here is pretty solid, just needs some code style clean up - I will merge this shortly with all of the needed minor/cosmetic fixes. |
@wesleycho , @paulorbpacheco i use a tabset in the modal. when i update to v0.13.2, my modals without tabs work as expected, but it turn to tabs and modal aggregation, it can only trap the here is a plukr that reproduce the problem. i'm not sure if i use it on the wrong place or the modal source code has some bugs not concerned yet. |
Can you file a new issue? This isn't the place to discuss it. |
ok, i have filed it just now |
Hello @e-cloud, |
Fix Modal: Focus is now trapped inside when modal is opened. It works in both directions with tab or shift+tab. No more focus tab on background.
Refs: #738, #3689