Opened 8 years ago

Closed 6 years ago

#12298 closed defect (invalid)

TooltipDialog: unable to focus iframe inside of dijit.TooltipDialog

Reported by: Caleb Maclennan Owned by:
Priority: low Milestone: 1.9
Component: Dijit Version: 1.6.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

When rendering an iframe inside a dijit.TooltipDialog, focus inside the iframe makes the tooltip disapear.

Use case: FB like button inside a drop down menu. The initial display works fine, clicking on the button itself doesn't do anything other than the tooltip losing focus and going away.

Dojo 1.6.0b2

Attachments (2)

TooltipDialogIframe.html (1.4 KB) - added by Caleb Maclennan 8 years ago.
Test case shows that focusing an iframe insdie a TooltipDialog? closes to popup.
TooltipDialogIframeRegistered.html (1.4 KB) - added by bill 6 years ago.
works if you call registerIframe() after iframe has loaded

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by Caleb Maclennan

Possibly related focus issue in #12297

comment:2 Changed 8 years ago by bill

Summary: Unable to focus iframe inside of dijit.TooltipDialogTooltipDialog: unable to focus iframe inside of dijit.TooltipDialog

OK, please attach a test case.

Changed 8 years ago by Caleb Maclennan

Attachment: TooltipDialogIframe.html added

Test case shows that focusing an iframe insdie a TooltipDialog? closes to popup.

comment:3 Changed 8 years ago by bill

Description: modified (diff)
Milestone: tbdfuture

Thanks for the test case... you mentioned "focus inside the iframe" but in that test case, there isn't anywhere inside the iframe to focus, is there?

In any case, I'm not surprised this fails, we would need to add some extra code to figure out where to focus inside the iframe.

comment:4 in reply to:  3 Changed 8 years ago by Caleb Maclennan

Replying to bill:

Thanks for the test case... you mentioned "focus inside the iframe" but in that test case, there isn't anywhere inside the iframe to focus, is there?

Perhaps "focus" isn't the right lingo here, but it isn't necessary to have an item inside the iframe that receives focus, just the document is enough. That src href is to a file in the dijit tests directory, any html data will work. Clicking anywhere inside the iframe triggers this behavior.

comment:5 Changed 6 years ago by bill

Milestone: future1.9
Priority: highlow

I suspect you need to call registerIframe(). See #16517. I may solve both of these tickets with the same fix, so marking this for possible inclusion in 1.9.

comment:6 Changed 6 years ago by bill

Resolution: invalid
Status: newclosed

OK, you do need to call regsterIframe() and then it works. Admittedly that's not convenient and not documented well, but that's the API. I'll attach a working test case.

Changed 6 years ago by bill

works if you call registerIframe() after iframe has loaded

Note: See TracTickets for help on using tickets.