mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Binded closeDialogue to esc
In that way the user can exit a dialogue without using the button and the mouse
This commit is contained in:
@@ -8,6 +8,8 @@ const Dialogue = (() => {
|
||||
const popUpContainer = document.getElementById("pop-up-container");
|
||||
const cancelButtons = popUpContainer.getElementsByClassName('close-button');
|
||||
|
||||
Events.onCustom("esc-pressed", closeDialogue);
|
||||
|
||||
// Add click handlers for all cancel buttons
|
||||
for (var i = 0; i < cancelButtons.length; i++) {
|
||||
cancelButtons[i].addEventListener('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user