TestCase "test_Dialog_focusDestroy" does not work properly in Dojo release 1.5
I'm currently using dojo 1.5 and trying to create a simple dojo dialog where once focus is on dialog the main content cannot be edited. I found this functionality under following testcase.
http://download.dojotoolkit.org/release-1.5.0/dojo-release-1.5.0/dijit/tests/test_Dialog_focusDestroy.html
Unfortunately, This test ca开发者_Python百科se only work for first click of the "show dialog" button (once click, can not edit main content). Subsequent clicks of "show dialog" button does not disable the main content as intended:( (without refreshing the page). Since overlay functionality does not work properly, user is able to create multiple instances of same dialog by clicking "show dialog" button.
However, I found this test case properly work in one of Dojo previous release 1.2.3.
http://download.dojotoolkit.org/release-1.2.3/dojo-release-1.2.3/dijit/tests/test_Dialog_focusDestroy.html
Please provide me a clarification regarding above dialog functionality. Is there any way to get around this problem in Dojo 1.5?
[EDIT] I resolve this problem by calling .hide() before calling .destroy() of dialog. Refer to description of
http://trac.dojotoolkit.org/ticket/5351. It looks like this bug should be re-open.looks like a bug, but perhaps not the same as but #5351. The area behind the dialog is not disabled, but the keys and focus seem to be working correctly. Perhaps you should open a new ticket.
精彩评论