Join GitHub today
Close infinite editors with the esc key #3895
The PR implements a global way to close infinite editors with the ESC key so each infinite editor doesn't have to do the implementation themselves. This also means that it requires a "close" callback function on the infinite editor for this to work. We have to do it this way so we make sure that if any logic has to be run when an infinite editor is closed still works.
How to test:
Dec 17, 2018
I am closing this PR again as it is not the correct solution. We will have to control the shortcut from within each infinite editor so we are sure that all logic that needs to be run is run.
It can probably be solved the same way as with any other shortcut in infinite editors just to bind the keyboard shortcut to the close button by using the "shortcut" attribute and bind it to "esc".
@elit0451, it turns out that we have to rebind the keyboard shortcuts after the animation is done upon closing the editor with the esc key.
I found out that a 0 ms timeout around
Also, found out that the esc shortcut does not work on media picker editor - a quick inspection on the close button showed me that there is no shortcut added.