Only close the user panel drop-downs if no key modifier was pressed
authorAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 21:48:54 +0000 (22:48 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 21:48:54 +0000 (22:48 +0100)
wcfsetup/install/files/js/WCF.User.js

index c11f7726990981a6b990a08cec9ade673a363a77..2773f65f773556289d10e22f29a275cd75d89031 100644 (file)
@@ -629,6 +629,11 @@ if (COMPILER_TARGET_DEFAULT) {
                        
                        elBySelAll('.interactiveDropdownItemShadowLink', this._dropdown.getItemList()[0], (function (link) {
                                link.addEventListener('click', (function (event) {
+                                       if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
+                                               // Only close the drop-down if no key modifier was pressed.
+                                               return;
+                                       }
+                                       
                                        this._dropdown.close();
                                }).bind(this));
                        }.bind(this)));