简体   繁体   English

ExtJS防止LoadMask窃取焦点

[英]ExtJS Prevent LoadMask from Stealing Focus

I have established my own Store class where I can optionally enable "Polling" on the store, which initializes a TaskRunner task to reload() the Store on a defined internal. 我建立了自己的Store类,可以在其中选择启用商店上的“轮询”,这将初始化TaskRunner任务以在定义的内部reload() Store That is all well and good, however when the PollingStore is bound to a View , the LoadMask will automatically show whenever the reload() method is invoked. 很好,但是当PollingStore绑定到View ,只要调用reload()方法, LoadMask就会自动显示。

This is desirable behavior.... for the most part. 在大多数情况下,这是理想的行为。 My issue is that when the user has another window (eg, for creating a new product) open "in front" of the grid (in zindex terms). 我的问题是,当用户有另一个窗口(例如,用于创建新产品)时,在网格的“前面”(以zindex的形式)打开。 Whenever the reload() method is invoked on the Store , the now-bound LoadMask will appear in front of EVERYTHING, ie, including the window that the user is currently interacting with, which is separate from the Grid associated to the Store being loaded. 每当在Store上调用reload()方法时,现在绑定的LoadMask就会出现在EVERYTHING的前面,即包括用户当前正在与之交互的窗口,该窗口与与要加载的Store相关联的Grid分开。

I have managed to override the initComponent method and ensure that the LoadMask does not appear "over" other components, but it still manages to steal focus from whatever form fields the user happens to be filling out in the modal window at that time.... 我设法覆盖了initComponent方法,并确保LoadMask不会出现在“其他”组件上方,但是它仍然设法从当时用户恰好在模态窗口中填写的任何表单字段中窃取了焦点。 。

Again, breakdown of steps here... 同样,这里的步骤细分...

  1. Establish a Grid with a connected Store 与连接的商店建立网格
  2. Establish TaskRunner task on Store to reload every 30 seconds 在商店上建立TaskRunner任务,每30秒重新加载一次
  3. While viewing the Grid, open a modal Window containing a few form fields 在查看网格时,打开一个包含一些表单域的模态窗口
  4. Begin filling out form fields. 开始填写表单字段。 Whenever the Store happens to reload, focus will be stolen. 每当商店碰巧重新加载时,焦点就会被窃取。 THIS IS THE PROBLEM 这就是问题

Any input would be great, please ask if any additional information or screenshots would be helpful. 任何输入都很好,请询问是否有其他信息或屏幕截图会有所帮助。

我最终修复了4.2.1,从而解决了我的问题,现在,LoadMask已正确绑定到视图,并且没有优先于模态窗口,并且工具提示不再占据焦点。

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

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