slugbucket / crossword-hints

Python Flask web application to aid decipherment of cryptic crossword clues for known setters
GNU General Public License v3.0
1 stars 0 forks source link

Press ESC to close solution-type modal dialog- feat0030 #31

Closed slugbucket closed 4 years ago

slugbucket commented 4 years ago

On the crossword solutions entry form when dislaying the solution types modal dialog, pressing the ESCape key has no effect; it should close the dialog.

slugbucket commented 4 years ago

This simply a matter of adding an extra window (not modal) event handler:

    // Press the ESC key to exit the dialog
    window.onkeydown = function(event) {
      if (event.which == 27) {
        modal.style.display = "none";
      }
    }
slugbucket commented 4 years ago

Featire implemented.