Logic for detecting escape code is not failsafe.

Created on 13 July 2023, over 1 year ago
Updated 22 August 2023, over 1 year ago

Is there any reason why the keydown event is not as simple as:

        modal.on('keydown', function (e) {
          if (e.key === 'Escape') {
            e.preventDefault();
            e.returnValue = false;
          }
        });

From what I have read keyCode has been deprecated, and in my case 9 is not the escape code, 27 is. The event code right now is not working.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024