Loading admin_toolbar_search/js/admin_toolbar_search.keyboard_shortcut.js +3 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ ).forEach(() => { // Shortcut 'Alt + a' will focus on the search form. document.addEventListener('keydown', (event) => { if (event.altKey && event.key === 'a') { if (event.altKey && (event.key === 'a' || event.keyCode === 65)) { const searchInputField = context.getElementById( 'admin-toolbar-search-input', ); Loading @@ -38,6 +38,8 @@ .click(); } searchInputField.focus(); // Don't transmit the keystroke. event.preventDefault(); } }); }); Loading js/admin_toolbar.toggle_shortcut.js +3 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,9 @@ // Shortcut 'Alt + p' will toggle the display of the toolbar. document.addEventListener('keydown', (event) => { if (event.altKey && event.key === 'p') { if (event.altKey && (event.key === 'p' || event.keyCode === 80)) { // Prevent transmitting keypress. event.preventDefault(); // Toggle the display of the toolbar. this.toggle(); } Loading Loading
admin_toolbar_search/js/admin_toolbar_search.keyboard_shortcut.js +3 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ ).forEach(() => { // Shortcut 'Alt + a' will focus on the search form. document.addEventListener('keydown', (event) => { if (event.altKey && event.key === 'a') { if (event.altKey && (event.key === 'a' || event.keyCode === 65)) { const searchInputField = context.getElementById( 'admin-toolbar-search-input', ); Loading @@ -38,6 +38,8 @@ .click(); } searchInputField.focus(); // Don't transmit the keystroke. event.preventDefault(); } }); }); Loading
js/admin_toolbar.toggle_shortcut.js +3 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,9 @@ // Shortcut 'Alt + p' will toggle the display of the toolbar. document.addEventListener('keydown', (event) => { if (event.altKey && event.key === 'p') { if (event.altKey && (event.key === 'p' || event.keyCode === 80)) { // Prevent transmitting keypress. event.preventDefault(); // Toggle the display of the toolbar. this.toggle(); } Loading