totaljs / openplatform

OpenPlatform v5 is a beautiful and simple portal for running, integrating and managing multiple 3rd party web applications.

Home Page:https://www.totaljs.com/openplatform/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add event listener to ESC key to close windows

landsman opened this issue · comments

It's frustrating that I can not close windows by pressing the ESC key.
Please add an event listener for that. 🙏

btw here is great standard which you can probably use, to make it work out of the box: https://blog.webdevsimplified.com/2023-04/html-dialog/

It depends on which modal forms because if you fill a form and press the ESC key accidentally, your data will be lost. Therefore we disabled this functionality.

It depends on which modal forms because if you fill a form and press the ESC key accidentally, your data will be lost. Therefore we disabled this functionality.

Okay, I understand. Anyway, you can do confirm() dialog if data was modified and not saved yet. Or save them to localStorage, for easy recovery, as many platforms do.

Yes, but it's not easy to implement it thoroughly. We will add notes about it to our to-do list for future implementation. Try to find a smart solution for all forms and make a pull request if you need it ASAP. We will consider approving.