diff --git a/ChangeLog b/ChangeLog index 8555e996f4..91fefdfad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -95,6 +95,7 @@ phpMyAdmin - ChangeLog - issue Fix failure if relational display field value is NULL - "Display column for relationships" - issue #16033 Remove vendor bin files from non source version of phpMyAdmin - issue #15898 [security] Fix escape tbl_storage_engine argument used on tbl_create.php +- issue #15224 Don't fire keyboard shortcuts while SQL query area is focused (on a mobile for example) 5.0.1 (2020-01-07) - issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value diff --git a/js/shortcuts_handler.js b/js/shortcuts_handler.js index 272a781ac6..49db60f13c 100644 --- a/js/shortcuts_handler.js +++ b/js/shortcuts_handler.js @@ -24,6 +24,11 @@ $(function () { var keyC = 67; var keyBackSpace = 8; $(document).on('keyup', function (e) { + // is a string but is also a boolean according to https://api.jquery.com/prop/ + if ($(e.target).prop('contenteditable') === 'true' || $(e.target).prop('contenteditable') === true) { + return; + } + if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'SELECT') { return; } @@ -39,6 +44,11 @@ $(function () { } }); $(document).on('keydown', function (e) { + // is a string but is also a boolean according to https://api.jquery.com/prop/ + if ($(e.target).prop('contenteditable') === 'true' || $(e.target).prop('contenteditable') === true) { + return; + } + // disable the shortcuts when session has timed out. if ($('#modalOverlay').length > 0) { return;