Opening bookmarks in new tabs and reusing the current tab

Yuri Khan yuri.v.khan at gmail.com
Thu Dec 7 09:25:01 UTC 2017


Hello Firefox developers,

I was told to come here for a feature discussion.

I am a long time user of the Tab Mix Plus extension, and the
Tabbrowser Preferences extension before that. Over time, I acquired a
workflow that I am so far unable to replicate in Firefox 57 and later.

Among other things, TMP allows the user to customize which UI gestures
cause pages to open in a new tab. For starters, I’m going to limit
this discussion only to bookmarks, and only to the aspect of opening a
new tab or reusing the current tab.


The default Firefox behavior, let’s call it “A”, is:

* If the current tab is pinned, the bookmark is opened in a new tab.
* Otherwise, left click or the Enter key opens the bookmark in the current tab.
* Middle click or the Ctrl+Enter key opens the bookmark in a new tab.
* Right click opens a context menu that lets the user open the
bookmark in the current tab, a new tab, a new window, or a new Private
Browsing window.

(For brevity, I’m going to omit keyboard shortcuts from here on. Just
mentally replace each “left click” with “left click or Enter” and each
“middle click” with “middle click or Ctrl+Enter”.)

There is a new preference in Firefox 57,
browser.tabs.loadBookmarksInTabs. When this preference is set to true,
the behavior changes to “B”:

* Both left click and middle click open the bookmark in a new tab.
* Right click works the same as default.

This leaves out one other case “C” that was possible with TMP. It
effectively swaps the left and middle click functions with respect to
bookmarks:

* If the current tab is pinned, the bookmark is opened in a new tab.
* Left click opens the bookmark in a new tab.
* Middle click opens the bookmark in the current tab (unless it is pinned).
* Right click works the same as default.


I find this latter setup immensely useful and rely on it in my
day-to-day work. I find it very comforting to know that I will never
lose a loaded page by carelessly opening a bookmark over it, but still
I have an easy gesture to indicate that the current page is no longer
needed.

However, this setup is not supported by Firefox 57 and above.


[Bug 1397372] was filed as a suggestion to change the behavior of
loadBookmarksInTabs so that middle click loads bookmarks in the
current tab, so that there are easy gestures for both functions.

Justin Dolske [:Dolske] and :Gjis objected that they expect the middle
button to load bookmarks in a new tab (without indicating that they in
fact set loadBookmarksInTabs to true). :Gjis additionally suggested
that users can right-click the bookmark and choose “Open” from the
context menu.

In a comment to the same bug, YF (Yang) suggested adding a new
preference to control which of “B” or “C” takes place when
loadBookmarksInTabs is set to true.


I filed [bug 1416545] before I found 1397372, suggesting the same behavior.

Mark Banner [:standard8] confirmed the bug, and Marco Bonardo [:mak]
marked it as P5, which I took as a sign of recognition that the
proposed change solves an existing problem that some users have, and
implemented a patch.

Then I found 1397372 and, recognizing that there may be users who want
new tabs no matter which button is used, I implemented a patch that
introduces a separate preference, as suggested by Yang.

Marco reviewed the patch and said he’d rather not multiply preferences
because they make testing and support harder.


I do not view the suggestion to right-click and choose “Open” as a
viable solution for us users who want “C”. That is three user actions:
right-click, point at Open, left-click, as opposed to a single middle
click. It would work if we always opened bookmarks in a new tab and
only needed to reuse the current tab, say, once in a month. I do not
have precise statistics, but with a distribution of, say, 70% open new
tab, 30% reuse current tab, I want single clicks for both.


So now we are left with the following situation:

1. There is a group of end users who want behavior “C”.
2. Two core developers object against replacing the existing behavior
“B” with behavior “C”.
3. Two core developers agree that behavior “C” is sensible.
4. One core developer objects against having two separate preferences
for the left and middle buttons.

I am now asking for opinions. Do you agree behavior “C” is sensible?
If not, why not? Do you agree it should be an option for users? If
not, why not? Do you think a single boolean preference is not enough
but two boolean preferences are too many so we should change to a
single tri-state preference? Do you think it should not be preferences
but rather extension API?

I am prepared to spend time to implement the feature in any way that
is deemed acceptable and that gets me my preferred behavior in
Firefox.

Thank you for your attention.

[Bug 1397372]: https://bugzilla.mozilla.org/show_bug.cgi?id=1397372
[bug 1416545]: https://bugzilla.mozilla.org/show_bug.cgi?id=1416545


More information about the firefox-dev mailing list