Enable tab drop feature in split view and update event listener accordingly

This commit is contained in:
mr. M
2025-03-10 17:01:15 +01:00
parent 3972a181e6
commit a9f2bf2d54
2 changed files with 6 additions and 3 deletions

View File

@@ -89,9 +89,11 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
this.insertIntoContextMenu();
// Add drag over listener to the browser view
const tabBox = document.getElementById('tabbrowser-tabbox');
tabBox.addEventListener('dragover', this.onBrowserDragOverToSplit.bind(this));
this.onBrowserDragEndToSplit = this.onBrowserDragEndToSplit.bind(this);
if (Services.prefs.getBoolPref('zen.splitView.enable-tab-drop')) {
const tabBox = document.getElementById('tabbrowser-tabbox');
tabBox.addEventListener('dragover', this.onBrowserDragOverToSplit.bind(this));
this.onBrowserDragEndToSplit = this.onBrowserDragEndToSplit.bind(this);
}
}
insertIntoContextMenu() {