The space key should not collapse drop-downs attached to `<input>`
authorAlexander Ebert <ebert@woltlab.com>
Sun, 19 Jan 2020 18:12:56 +0000 (19:12 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 19 Jan 2020 18:12:56 +0000 (19:12 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js

index 660cb68db000388e2c015499b231422fd5180ab9..5f5594d7eed0a98c72747452df7eb3a8dd932be7 100644 (file)
@@ -549,7 +549,7 @@ define(
                },
                
                _handleKeyDown: function(event) {
-                       if (EventKey.Enter(event) || EventKey.Space(event)) {
+                       if (EventKey.Enter(event) || (EventKey.Space(event) && event.currentTarget.nodeName !== 'INPUT')) {
                                event.preventDefault();
                                this._toggle(event);
                        }