Skip to content

Commit fd6bd12

Browse files
committed
fix: unit tests failing issue
1 parent c601e61 commit fd6bd12

File tree

1 file changed

+7
-14
lines changed
  • src/extensionsIntegrated/TabBar

1 file changed

+7
-14
lines changed

src/extensionsIntegrated/TabBar/main.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,27 +239,20 @@ define(function (require, exports, module) {
239239
if ($('.not-editor').length === 1) {
240240
$tabBar = $(TabBarHTML);
241241
// since we need to add the tab bar before the editor which has .not-editor class
242-
// we target the `.not-editor` class and add the tab bar before it
243-
setTimeout(function () {
244-
$(".not-editor").before($tabBar);
245-
WorkspaceManager.recomputeLayout(true);
246-
updateTabs();
247-
}, 0);
242+
$(".not-editor").before($tabBar);
243+
WorkspaceManager.recomputeLayout(true);
244+
updateTabs();
248245

249246
} else if ($('.not-editor').length === 2) {
250247
$tabBar = $(TabBarHTML);
251248
$tabBar2 = $(TabBarHTML2);
252249

253250
// eq(0) is for the first pane and eq(1) is for the second pane
254-
// here #editor-holder cannot be used as in split view, we only have one #editor-holder
255-
// so, right now we are using .not-editor. Maybe we need to look for some better selector
256251
// TODO: Fix bug where the tab bar gets hidden inside the editor in horizontal split
257-
setTimeout(function () {
258-
$(".not-editor").eq(0).before($tabBar);
259-
$(".not-editor").eq(1).before($tabBar2);
260-
WorkspaceManager.recomputeLayout(true);
261-
updateTabs();
262-
}, 0);
252+
$(".not-editor").eq(0).before($tabBar);
253+
$(".not-editor").eq(1).before($tabBar2);
254+
WorkspaceManager.recomputeLayout(true);
255+
updateTabs();
263256
}
264257

265258
setupTabBar();

0 commit comments

Comments
 (0)