Skip to content

Commit

Permalink
Refactor mouse drag and drop (#61) (closed #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
onemen authored Aug 16, 2021
1 parent 316280c commit 29bbd1a
Show file tree
Hide file tree
Showing 42 changed files with 432 additions and 846 deletions.
15 changes: 14 additions & 1 deletion addon/chrome/content/click/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,20 @@ var TabmixTabClickOptions = {
return;

aEvent.preventDefault();
}
},

/**
* block mouse down with modifiers if the modifier is used by our clicking option
*/
blockMouseDown(event) {
if (event.shiftKey && Tabmix.prefs.getIntPref("shiftClickTab") != -1 ||
event.altKey && Tabmix.prefs.getIntPref("altClickTab") != -1 ||
(event.ctrlKey || event.metaKey) && Tabmix.prefs.getIntPref("ctrlClickTab") != -1
) {
return true;
}
return false;
},
};

var TabmixContext = {
Expand Down
4 changes: 1 addition & 3 deletions addon/chrome/content/links/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ Tabmix.beforeStartup = function TMP_beforeStartup(tabBrowser, aTabContainer) {
return this.isBlankBrowser(this.getBrowserForTab(aTab));
};

//XXX isTabEmpty exist in Firefox 4.0 - same as isBlankNotBusyTab
// isTabEmpty don't check for Tabmix.isNewTabUrls
tabBrowser.isBlankNotBusyTab = function TMP_isBlankNotBusyTab(aTab, aboutBlank) {
if (aTab.hasAttribute("busy") || aTab.hasAttribute("pending"))
if (aTab.hasAttribute("busy"))
return false;

return this.isBlankBrowser(this.getBrowserForTab(aTab), aboutBlank);
Expand Down
Loading

0 comments on commit 29bbd1a

Please sign in to comment.