Fixed overflow marker not present on init
authorAlexander Ebert <ebert@woltlab.com>
Sat, 1 Oct 2016 09:13:41 +0000 (11:13 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 1 Oct 2016 09:13:41 +0000 (11:13 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/TabMenu.js

index 59704c5d04f8d3d7abd0f72950dd9798fc703925..347c4322f184bb9d1252528c29bca55bd1e9cb36 100644 (file)
@@ -132,11 +132,15 @@ define(['Dictionary', 'EventHandler', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Clos
                _scrollEnable: function (isSetup) {
                        _enableTabScroll = true;
                        
-                       if (!isSetup) {
-                               _tabMenus.forEach((function (tabMenu) {
-                                       this.scrollToTab(tabMenu.getActiveTab());
-                               }).bind(this));
-                       }
+                       _tabMenus.forEach((function (tabMenu) {
+                               var activeTab = tabMenu.getActiveTab();
+                               if (isSetup) {
+                                       this._rebuildMenuOverflow(activeTab.closest('.menu, .tabMenu'));
+                               }
+                               else {
+                                       this.scrollToTab(activeTab);
+                               }
+                       }).bind(this));
                },
                
                _scrollDisable: function () {