Open Bug 1754432 Opened 4 years ago Updated 2 years ago

Add a new loadInBackground pref to change default behavior for urlbar and searchbar

Categories

(Firefox :: Address Bar, enhancement, P3)

Desktop
Unspecified
enhancement

Tracking

()

People

(Reporter: aminomancer, Unassigned)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

Add a new pref that changes what happens when user activates a urlbar/searchbar result. If user has browser.urlbar.openintab enabled and activates a result, it will open in a new selected tab. The same will happen if user Accel+clicks a result and does not have that pref enabled. Adding an additional modifier will make the tab open in the background. This pref will basically reverse those behaviors, such that a new tab opened via the urlbar or searchbar will open in the background by default; and adding the additional modifier will make it open in the foreground.

Behavior is the same for search one-off buttons, except that instead of ever launching a search in the current tab, it will simply enable the corresponding search mode. This might be locked behind a pref and restricted to Nightly as it may be affected by other related bugs (bug 1536756, bug 1753878).

The pref in question results in a lot of branching paths, determined by both prefs and modifiers. So it's hard to describe. I made a patch that includes most of the features blocking bug 1753863, so if you want a better sense of how this works in practice you can try building it. Here's a map of all the possible pref and modifier key combinations:

  1. Default state (both prefs false)
    1. current = Left click or Enter
    2. new active tab = Ctrl + left click, Alt + Enter, or middle click
    3. new background tab = Ctrl + Shift + left click, Shift + Alt + Enter, or Shift + middle click
  2. browser.urlbar.loadInBackground = true
    1. current = Left click or Enter
    2. new active tab = Ctrl + Shift + left click, Shift + Alt + Enter, or Shift + middle click
    3. new background tab = Ctrl + left click, Alt + Enter, or middle click
  3. browser.urlbar.openintab = true
    1. current = Ctrl + left click, Alt + Enter, or middle click
    2. new active tab = Left click or Enter
    3. new background tab = Ctrl + Shift + left click, Shift + Alt + Enter, or Shift + middle click
  4. browser.urlbar.loadInBackground and browser.urlbar.openintab = true
    1. current = Ctrl + left click, Alt + Enter, or middle click
    2. new active tab = Ctrl + Shift + left click, Shift + Alt + Enter, or Shift + middle click
    3. new background tab = Left click or Enter
Severity: -- → N/A
Type: task → enhancement
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.