Skip to main content

Search and Top Navigation

#9186 closed bug (notabug)

Opened March 26, 2013 03:14PM UTC

Closed March 26, 2013 03:20PM UTC

Last modified March 26, 2013 03:45PM UTC

modal Dialog appended to ui-tabs-panel: Error: Cannot call method '_focusTabbable'

Reported by: tcovo Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

I am using the Dialog widget's new "appendTo" option to associate a modal dialog with a particular tab panel, so that when the tab is deactivated, the dialog is hidden. However, when I re-activate the tab containing the dialog, I get the following error:

'''Uncaught TypeError: Cannot call method '_focusTabbable' of undefined'''

(that is the text in Chrome; Firefox produces a less descriptive message)

You may wonder how I am switching tabs if the dialog is modal: I manipulate the ui-widget-overlay so that it does not obstruct the tab handles. For this reason, I worry that maybe this is too far outside the expected use case to be considered a bug.

Here is a minimal jsfiddle reproducing the error: http://jsfiddle.net/jsYCR/1/

For a simpler example which uses show() and hide() instead of tabs, but ''fails'' to reproduce the error, see http://jsfiddle.net/jsYCR/

This issue seems related to http://bugs.jqueryui.com/ticket/9000, but that issue was closed as 'fixed'.

I tried to narrow down the problem, and I think it's related to this selector on line 5766 of jquery-ui-1.10.2.custom.js:

$(".ui-dialog:visible:last .ui-dialog-content")

It seems this is getting evaluated before the dialog is visible.

Attachments (0)
Change History (3)

Changed March 26, 2013 03:20PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

We don't support partial modals. This is broken because you're changing the positioning of the overlay from fixed to absolute, which isn't supported.

Changed March 26, 2013 03:36PM UTC by tcovo comment:2

OK, fair enough.

Any idea how to do this properly? Should I roll my own overlay mechanism?

Thanks

Changed March 26, 2013 03:45PM UTC by scottgonzalez comment:3

Yes, you'll need to roll your own.