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

uib-dropdown breaks tab order #5782

Closed
ghost opened this issue Apr 11, 2016 · 7 comments
Closed

uib-dropdown breaks tab order #5782

ghost opened this issue Apr 11, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2016

Bug description:

If you open the list and make a selection the tab order is reset and hitting tab after the list closes moves the focus to the top of the page. This can be seen in the demo page: https://angular-ui.github.io/bootstrap/ Opening and closing the list without clicking a list item does not interrupt the tab order.

Link to minimally-working plunker that reproduces the issue:

the behavior is seen on https://angular-ui.github.io/bootstrap/

Version of Angular, UIBS, and Bootstrap

Angular:1.5.3

UIBS:1.3.1

Bootstrap:3.3.6

@icfantv
Copy link
Contributor

icfantv commented Apr 11, 2016

@JessPam, i'm not seeing this, can you please provide exact steps to duplicate, including which dropdown on which you're trying this on? also, it may be better to try and isolate this in a stand-alone plunker. you can create one easily by clicking the applicable button below the demo.

@ghost
Copy link
Author

ghost commented Apr 12, 2016

I just verified that I see the issue on firefox and chrome. To reproduce, go to the demo URL indicated:
click "Dropdown on Body" in the dropdown section, but don't choose any item from the list
click "Dropdown on Body" again to close the list
press Tab key to tab to the next few controls, this should work fine

now, click "Dropdown on Body" again, but this time choose an item
the list will close. Now when you press the Tab key, you'll tab to the top of the page rather than the next control as before.

@ghost
Copy link
Author

ghost commented Apr 13, 2016

@icfantv Was that helpful?

@icfantv
Copy link
Contributor

icfantv commented Apr 13, 2016

@JessPam please understand that we are unpaid volunteers on this OSS project and that we will get to the issues when we are able to allocate the appropriate amount of time. continued pings are not necessary and considered rude. please exercise some patience.

to answer your question, yes, that was helpful. we will need to research what is involved here. it may not be as simple as returning the focus to the dropdown when closed because the dropdown may no longer exist (e.g., if the dropdown selection results in a route change).

@ghost
Copy link
Author

ghost commented Apr 13, 2016

@icfantv I just wanted to be sure you didn't need any more from me. Thanks for your attention and good luck!

@wesleycho
Copy link
Contributor

That's an interesting bug. On close, we should probably focus the dropdown element.

This could potentially have side-effects, but I think it's an ok change assuming no problems.

@stumblingmages
Copy link

@JessPam Not sure if it will help or not but some of my problems with unwanted navigation got better when I changed the anchor tags in my drop down menu to <a href="javascript:void(0)"> rather than <a href="#">.

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

Successfully merging a pull request may close this issue.

3 participants