#9186 closed bug (notabug)
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.
Change History (3)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
OK, fair enough.
Any idea how to do this properly? Should I roll my own overlay mechanism?
Thanks
We don't support partial modals. This is broken because you're changing the positioning of the overlay from
fixed
toabsolute
, which isn't supported.