Search and Top Navigation
#15182 closed bug (fixed)
Opened April 29, 2017 07:46PM UTC
Closed May 17, 2017 03:47PM UTC
Last modified June 02, 2017 07:45PM UTC
Error when underlaying dialog is closed after the new one is open
Reported by: | john357smith | Owned by: | scottgonzalez |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.2 |
Component: | ui.dialog | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Follow this case:
1. open first dialog (from link or button)
2. open second dialog (from button from previous dialog) and close first dialog via 'close' command
3. close second dialog (via closing button)
3. try open first dialog again and stack trace will occur saying "Uncaught TypeError: Cannot read property '_focusTabbable' of undefined"
Workaround: close first dialog first then open a new one.
Tested on: latest Chrome and Firefox
Code example:
<script> $(function() { $("#link_test1").on('click', function() { $("#test_dlg1").dialog('open'); }); $("#test_dlg2").dialog({ autoOpen: false, modal: true }); $("#test_dlg1").dialog({ autoOpen: false, modal: true, buttons: [ { text: "open", click: function() { $('#test_dlg2').dialog("open"); $(this).dialog("close"); } } ] }); }); </script> <a href="#" id="link_test1">open</a> <div id="test_dlg1" title="test1"> test1 </div> <div id="test_dlg2" title="test2"> test2 </div>
Attachments (0)
Change History (4)
Changed May 11, 2017 06:00PM UTC by comment:1
status: | new → open |
---|
Changed May 17, 2017 03:47PM UTC by comment:2
owner: | → scottgonzalez |
---|---|
resolution: | → fixed |
status: | open → closed |
In [changeset:"5708046ea1ba4d6d86f431ec9fd32d28ae7542f6" 5708046]:
#!CommitTicketReference repository="" revision="5708046ea1ba4d6d86f431ec9fd32d28ae7542f6"
Dialog: Fix shared event handler for modal dialogs
The old logic worked when all widgets of the same type used the same
event namespace. However, now that each instance has its own namespace,
we cannot use
for shared event handlers.
Fixes #15182
Closes gh-1817
Changed May 17, 2017 03:51PM UTC by comment:3
milestone: | none → 1.12.2 |
---|
https://github.com/jquery/jquery-ui/pull/1817