Window focus

The "onFocus" event is triggered only once (when calling the "show" method). In the future it is not possible to focus on the window. Although the UI looks like the focus is moving to the window.

https://snippet.webix.com/xypzkcsy

Tagged:

Comments

  • edited May 14

    Hi,

    The issue is connected with window initial visibility discussed in another thread.

    If a window is snown with the .show() method, it gets all the related events, as they reflect the change of its state.

  • Hello! I have another question on this point.
    Is it possible to add another event when "focusing" on windows (or rather when the window gets another z-Index)? For example, on line 7305 (webix UI v.6.4.0 GPL) add this.callEvent("customEventName").
    This functionality is necessary because there is a need to register the fact of moving the focus from one window to another.

    Or maybe you have other solutions to this problem.

  • edited August 15

    Hey @lBeJIuk, Webix already has a global event onFocusChange which triggers on a focus shift as you described. It works as expected in the case when we have multiple windows: https://snippet.webix.com/decd8ay3.

  • edited August 21

    Thank you for the answer @Dzmitry. But this is not exactly the behavior I expect.
    Here is an example:
    - The window is already "in focus" (it has the largest z-index), but still the focus changes.
    https://snippet.webix.com/dv3foa5o

  • You can make a check to see if the focus shifted from one window to another using getParentView and the incoming previous/current view parameters: https://snippet.webix.com/vk5cjth9.

  • Thank you very much. I will try to use this solution.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!