Hi!
Is there an easy way to close the window by pressing the “ESC” button on the keyboard?
Hello,
You can use onKeyPress event
Please check the sample: https://snippet.webix.com/e5v7h315
@Nastja
Sorry, but the example is not working:
https://snippet.webix.com/jkufdfp6
Probably because of this
https://forum.webix.com/discussion/36261/window-focus#latest
Please check the following example: https://snippet.webix.com/ibecdzgt
And the related discussion at https://forum.webix.com/discussion/comment/23968/#Comment_23968
-
If I have a lot of elements on the page, iterating over each one as for me is a bad idea.
-
It does not solve the problem of closing a “one specific” window by pressing a button.
Perhaps it would be the best solution to give the opportunity to configure the click handler…
Hello, are there any changes on this issue? => opportunity to configure the click handler
Hello,
closing a “one specific” window by pressing a button.
As far as I can see, you can just close the needed window by accessing it by ID:
https://snippet.webix.com/8gkd5g2o
But actualy I’m loosing the track of the initial problem. And please clarify how the “opportunity to configure the click handler” relates to it?
@Helga
Use case:
- Open window
- Press Esc button
- Close the window instead of hiding it / Or show the closing warning first, and only then close.
Now by pressing Esc all windows will be hidden by default. It is impossible to remove a standard action, and set a new one, with some change in logic.