traxium / tabtree

Tab Tree extension for Firefox
https://addons.mozilla.org/en-US/firefox/addon/tab-tree/
GNU General Public License v3.0
144 stars 30 forks source link

[Nightly] New tab button doesn't work #170

Closed WyohKnott closed 7 years ago

WyohKnott commented 7 years ago

Both the new tab button, and double-click to open a new tab, do not work in Firefox 51&52. The errors reported to the console are, respectively:

WyohKnott commented 7 years ago

After some digging, it seems the following commit is responsible for the removal of BrowserOpenNewTabOrWindow: https://hg.mozilla.org/mozilla-central/rev/cd5beac45eac In this commit, BrowserOpenNewTabOrWindow has been replaced by BrowserOpenTab.

It is explained in the related bug #528005: « This method [BrowserOpenNewTabOrWindow] is referenced by a number of add-ons including but not limited to tabmixplus. We probably need to list it in the compat notes. »

WyohKnott commented 7 years ago

I added a PR to correct the issue, but one also needs to set the minimum Firefox version to 51 for this specific change.

traxium commented 7 years ago

BrowserOpenNewTabOrWindow(event) was used in order to be able to open new windows while holding Shift

traxium commented 7 years ago

It happened that BrowserOpenTab({shiftKey: true}) can open new windows, but it doesn't work properly with maximized windows.

traxium commented 7 years ago

Replaced BrowserOpenTab(event) with openUILinkIn(BROWSER_NEW_TAB_URL, event.shiftKey ? "window" : "tab"). Now it should work in all versions.