Skip to content

Commit

Permalink
[FB] SplitView | Add selected tab at finish
Browse files Browse the repository at this point in the history
  • Loading branch information
surapunoyousei committed Oct 28, 2023
1 parent 77639dd commit 2678bcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions browser/base/content/browser-splitView.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let gSplitView = {
Services.prefs.setBoolPref("floorp.browser.splitView.working", false);
},
setSplitView(tab, side) {
try{this.removeSplitView()}catch(e){};
Services.prefs.setBoolPref("floorp.browser.splitView.working", true);

let panel = gSplitView.Functions.getlinkedPanel(tab.linkedPanel);
Expand Down Expand Up @@ -70,11 +71,13 @@ let gSplitView = {
gSplitView.Functions.setRenderLayersEvent();
},

removeSplitView(tab) {
removeSplitView() {
Services.prefs.setBoolPref("floorp.browser.splitView.working", false);

let tab = document.querySelector(`.tabbrowser-tab[splitView="true"]`);

if (!tab) {
tab = document.querySelector(`.tabbrowser-tab[splitView="true"]`);
return;
}

// remove style
Expand All @@ -93,6 +96,9 @@ let gSplitView = {
}

gSplitView.Functions.removeRenderLayersEvent();

// set renderLayers to true & Set class to deck-selected
gBrowser.selectedTab = tab;
},

getlinkedPanel(id) {
Expand Down
2 changes: 1 addition & 1 deletion browser/locales/l10n-central
Submodule l10n-central updated 348 files

0 comments on commit 2678bcc

Please sign in to comment.