1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 18:49:59 +02:00

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
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 6 additions and 3 deletions

View file

@ -187,6 +187,7 @@ pref('zen.sidebar.close-on-blur', true);
pref('zen.sidebar.max-webpanels', 8); pref('zen.sidebar.max-webpanels', 8);
// Zen Split View // Zen Split View
pref('zen.splitView.enable-tab-drop', true);
pref('zen.splitView.min-resize-width', 7); pref('zen.splitView.min-resize-width', 7);
pref('zen.splitView.change-on-hover', false); pref('zen.splitView.change-on-hover', false);
pref('zen.splitView.rearrange-hover-size', 24); pref('zen.splitView.rearrange-hover-size', 24);

View file

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