MDL-69301 theme_boost: Remove the special handling of Escape key
authorShamim Rezaie <shamim@moodle.com>
Thu, 10 Dec 2020 06:31:18 +0000 (17:31 +1100)
committerAdrian Greeve <abgreeve@gmail.com>
Thu, 10 Dec 2020 07:05:11 +0000 (15:05 +0800)
theme/boost/amd/build/aria.min.js
theme/boost/amd/build/aria.min.js.map
theme/boost/amd/src/aria.js

index 9e9de66..f3154ce 100644 (file)
Binary files a/theme/boost/amd/build/aria.min.js and b/theme/boost/amd/build/aria.min.js differ
index 50e8222..9878545 100644 (file)
Binary files a/theme/boost/amd/build/aria.min.js.map and b/theme/boost/amd/build/aria.min.js.map differ
index f0358a9..1acf867 100644 (file)
@@ -49,15 +49,6 @@ const dropdownFix = () => {
                 setFocusEnd();
             }
 
-            // Escape key only closes the menu, it doesn't open it.
-            if (trigger == 'Escape') {
-                const expanded = e.target.getAttribute('aria-expanded');
-                e.preventDefault();
-                if (expanded == "false") {
-                    e.target.click();
-                }
-            }
-
             // Space key or Enter key opens the menu.
             if (trigger == ' ' || trigger == 'Enter') {
                 // Cancel random scroll.