Opened 10 years ago

Closed 10 years ago

#9302 closed bug (duplicate)

Modal dialog focus bug?

Reported by: incutonez2 Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:


I'm not quite sure if this is a bug or a feature, but let's say I have the following example:

I have a dialog box with an anchor tag and some text that overflows, so the dialog box has vertical scrollbars present. If I scroll to the bottom of the dialog box, lose focus in the browser (usually minimize/maximize the browser works), and then click in the dialog box, it scrolls back to the topmost anchor.

I believe this has to do with the hasFocus.eq( 0 ).focus(); on line 9873 in the _focusTabbable function, which I believe gets called from the moveToTop function. At least, that's where my debugging led me. And from what I gather, the ":tabbable" will be triggered if you have an anchor tag, but I am curious to know the reasoning behind this and if it's a bug or a "feature" in this situation.

Here is the relevant JS Bin code. I have also posted this on Stack Overflow and the jQuery UI forums, but no dice in solving the problem.

This was reproduced using jQuery 1.9.1.

Change History (1)

comment:1 Changed 10 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #9101.

Note: See TracTickets for help on using tickets.