Opened 6 years ago

Closed 3 years ago

#9937 closed bug (patcheswelcome)

Dialog with iFrame and tab key focus

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

Description

Tab focus goes behind the modal dialog (press TAB key). It should stay in the modal dialog.

Test case: http://jsbin.com/furareka/1/edit?html,js,output

Regards

Change History (4)

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

Owner: set to franantares
Status: newpending

I'm not seeing that behavior. Which browser(s) are you experiencing this in?

comment:2 in reply to:  1 Changed 6 years ago by franantares

Status: pendingnew

Replying to scott.gonzalez:

I'm not seeing that behavior. Which browser(s) are you experiencing this in?

Sorry, forgot to mention. Chrome.

  • Click "open modal dialog"
  • Set focus with the mouse on "Email" textbox
  • Start tabbing (TAB key)
  • Tab focus will go out of the modal window (pay attention to the "Run with JS" button)

Thanks.

comment:3 Changed 6 years ago by tj.vantoll

It's a bit easier to view outside of the jsBin chrome: http://jsbin.com/furareka/1. It looks we don't allow elements behind the dialog to receive focus, but we do let focus escape to native browser controls.

I'd have to do some digging, but I'm not sure there's a sane way to contain focus within a dialog that contains embedded windows.

comment:4 Changed 3 years ago by Scott González

Resolution: patcheswelcome
Status: newclosed

As TJ said, I don't think there's a sane way to handle iframes inside dialogs. As soon as you add a new document inside the dialog, we're entering a completely different flow for the controls. The dialog is no longer managing focus at that point. I'd recommend inlining the content.

Note: See TracTickets for help on using tickets.