测试用例“test_Dialog_focusDestroy”在 Dojo 版本 1.5 中无法正常工作

发布于 2024-10-08 06:28:51 字数 1029 浏览 1 评论 0原文

我目前正在使用 dojo 1.5 并尝试创建一个简单的 dojo 对话框,其中一旦焦点位于对话框上,就无法编辑主要内容。我在以下测试用例下发现了此功能。

http://下载。 dojotoolkit.org/release-1.5.0/dojo-release-1.5.0/dijit/tests/test_Dialog_focusDestroy.html

不幸的是,这个测试用例适用于首次点击< /strong>“显示对话框”按钮(一旦点击,无法编辑主要内容)。后续单击“显示对话框”按钮不会按预期禁用主要内容:((无需刷新页面)。由于覆盖功能无法正常工作,用户可以通过单击“显示对话框”按钮创建同一对话框的多个实例 但是,

我发现这个测试用例在 Dojo 之前的版本 1.2.3 中可以正常工作

。 /tests/test_Dialog_focusDestroy.html" rel="nofollow noreferrer">http://download.dojotoolkit.org/release-1.2.3/dojo-release-1.2.3/dijit/tests/test_Dialog_focusDestroy.html

请向我提供有关上述对话框功能的说明。在 Dojo 1.5 中是否有任何方法可以解决此问题?

[编辑] 我通过在调用对话框的 .destroy() 之前调用 .hide() 解决了这个问题。参见
的说明 http://trac.dojotoolkit.org/ticket/5351。看来这个bug应该重新开放。

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 case 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

带上头具痛哭 2024-10-15 06:28:51

看起来像一个错误,但可能与 #5351 不同。对话框后面的区域并未被禁用,但按键和焦点似乎工作正常。也许您应该开一张新票。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文