简体   繁体   English

jQuery UI开关专注于多个模态对话框?

[英]jQuery UI switch focus on multiple modal dialogs?


is it possible to change focus between multiple jQuery UI modal dialogs? 是否有可能在多个jQuery UI模式对话框之间改变焦点?

Currently I open a few dialogs, positions relative and shifted to each other, so I can see them all. 目前我打开一些对话框,相对位置并相互转移,所以我可以看到它们。 But when I click on any of the dialogs in the "background", they don't get focused. 但是,当我点击“背景”中的任何对话框时,它们都无法集中注意力。 I have to close the dialogs in the reverse order that they have been opened by, so they gain focus one by one. 我必须按照它们打开的相反顺序关闭对话框,以便逐个获得焦点。

Yes, I know, the purpose of a modal dialog is to block everything else. 是的,我知道,模态对话框的目的是阻止其他一切。
But can it block everything except other modal dialogs? 但它可以阻止除了其他模态对话框之外的所有内容吗?

Btw. 顺便说一句。 its not a must-have. 它不是必须的。 I'm looking for a simple solution. 我正在寻找一个简单的解决方案。 If it requires a lot of changes to jquery ui core, its not worth the time 如果它需要对jquery ui core进行大量更改,那就不值得花时间了

Call the dialog instance's moveToTop method (see Methods tab) . 调用对话框实例的moveToTop方法(请参阅“方法”选项卡)

FWIW, there is also a focus event (see Events tab on previous link) which may be helpful in knowing when to call the method. FWIW,还有一个焦点事件(请参阅上一个链接上的“事件”选项卡),这可能有助于了解何时调用该方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM