From c0a2fcdd24896b2a1d703e70398adcd41027093a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 31 Jan 2025 22:01:34 +0100 Subject: [PATCH] Fix "$tab.activate.tab" called after renavigate --- src/definitions/modules/tab.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index b2d14966a3..5361aaa6d5 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -475,11 +475,14 @@ 'X-Remote': true, }, onSuccess: function (response) { + let $navigation = module.get.navElement(tabPath); + let isNavigationActive = $navigation.hasClass(className.active); + if (settings.cacheType === 'response') { module.cache.add(fullTabPath, response); } module.update.content(tabPath, response); - if (tabPath == activeTabPath) { + if (isNavigationActive && tabPath == activeTabPath) { module.debug('Content loaded', tabPath); module.activate.tab(tabPath); } else {