简体   繁体   中英

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

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

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

Again, breakdown of steps here...

  1. Establish a Grid with a connected Store
  2. Establish TaskRunner task on Store to reload every 30 seconds
  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已正确绑定到视图,并且没有优先于模态窗口,并且工具提示不再占据焦点。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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