Prevent the focus shift on Android
authorAlexander Ebert <ebert@woltlab.com>
Mon, 11 Dec 2023 17:19:15 +0000 (18:19 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 11 Dec 2023 17:19:15 +0000 (18:19 +0100)
See https://www.woltlab.com/community/thread/302991-is-this-normal-behavior/

wcfsetup/install/files/js/WCF.Message.js

index fe1dc83d593c0a4e0bcf1b08454383567bbe91b3..6af894f3ffd9c55919ea7999085eb484863e6611 100644 (file)
@@ -1911,7 +1911,10 @@ $.widget('wcf.messageTabMenu', {
                        });
                        this._tabsByName[$name] = $i;
                        
-                       var $anchor = $tab.children('a').data('index', $i).on('mousedown', this._showTab.bind(this));
+                       var $anchor = $tab.children('a')
+                               .data('index', $i)
+                               .on('mousedown', this._showTab.bind(this))
+                               .on('touchstart', this._showTab.bind(this));
                        // handle a11y
                        $anchor.attr('role', 'button').attr('tabindex', '0').attr('aria-haspopup', true).attr('aria-expanded', false).attr('aria-controls', $tabContainer[0].id);