Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The trap-input breaks if there is only one focusable item. #10

Open
kalile opened this issue Aug 20, 2015 · 6 comments
Open

The trap-input breaks if there is only one focusable item. #10

kalile opened this issue Aug 20, 2015 · 6 comments

Comments

@kalile
Copy link

kalile commented Aug 20, 2015

It doesn`t leave the loop in processTab if there is only one focusable item in the dialog.
The solution would be very simple.

@julienw
Copy link
Owner

julienw commented Aug 21, 2015

Hi, thanks for the report ! Do you happen to have a testcase somewhere ?

@marcysutton
Copy link

looks like there's an old PR open for that: #5

@julienw
Copy link
Owner

julienw commented Sep 1, 2015

Thanks for the reminder, looks like I'm late handling all this.

I'll try to look at it tomorrow, but otherwise this will have to wait one more week as I'm leaving for holidays.

@kalile
Copy link
Author

kalile commented Sep 1, 2015

Nice Folks!
About the fix, I would avoid the first loop, and just return in a previous check.
But that solves the issue as well! :)

@SaiKrishnam
Copy link

Replace
while(elt === elt.ownerDocument.activeElement)
with
while(elt === elt.ownerDocument.activeElement && curElt)

It works

@julienw
Copy link
Owner

julienw commented Oct 15, 2016

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants