Skip to content

Commit 6c4a6a1

Browse files
committed
remove tab autoTabActivation option (unused)
1 parent e5d3d03 commit 6c4a6a1

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

web_src/js/features/common-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function initGlobalDropdown() {
7777
}
7878

7979
export function initGlobalTabularMenu() {
80-
fomanticQuery('.ui.menu.tabular:not(.custom) .item').tab({autoTabActivation: false});
80+
fomanticQuery('.ui.menu.tabular:not(.custom) .item').tab();
8181
}
8282

8383
// for performance considerations, it only uses performant syntax

web_src/js/features/imagediff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ImageDiff {
7575
this.containerEl = containerEl;
7676
containerEl.setAttribute('data-image-diff-loaded', 'true');
7777

78-
fomanticQuery(containerEl).find('.ui.menu.tabular .item').tab({autoTabActivation: false});
78+
fomanticQuery(containerEl).find('.ui.menu.tabular .item').tab();
7979

8080
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
8181
this.diffContainerWidth = Math.max(containerEl.closest('.diff-file-box').clientWidth - 300, 100);

web_src/js/modules/fomantic/tab.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import $ from 'jquery';
22
import {queryElemSiblings} from '../../utils/dom.ts';
33

44
export function initFomanticTab() {
5-
$.fn.tab = function (this: any, arg0: any) {
6-
const autoTabActivation = arg0?.autoTabActivation;
5+
$.fn.tab = function (this: any) {
76
for (const elBtn of this) {
87
const tabName = elBtn.getAttribute('data-tab');
98
if (!tabName) continue;
@@ -14,10 +13,6 @@ export function initFomanticTab() {
1413
elBtn.classList.add('active');
1514
elTab.classList.add('active');
1615
});
17-
if (autoTabActivation && elBtn.classList.contains('active')) {
18-
const elTab = elBtn.querySelector(`.ui.tab[data-tab="${tabName}"]`);
19-
elTab.classList.add('active');
20-
}
2116
}
2217
return this;
2318
};

0 commit comments

Comments
 (0)