Open Bug 1765440 Opened 3 years ago Updated 1 year ago

Bookmarks and history items opened from the library force the browser window to the front

Categories

(Firefox :: Bookmarks & History, defect, P3)

Firefox 99
defect

Tracking

()

ASSIGNED
Tracking Status
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- fix-optional

People

(Reporter: busy1, Assigned: aminomancer)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:99.0) Gecko/20100101 Firefox/99.0

Steps to reproduce:

FF-Preferences-General-Tabs (Settings) 3rd line: "When you open a link, image or media in a new tab, switch to it immediately". Box for selecting option is NOT checked.

Actual results:

Link immediately opens in new tab.

Expected results:

Link should have created a new tab, but not switched to new tab.

The Bugbug bot thinks this bug should belong to the 'Firefox::Preferences' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Preferences

Hi busy1,

Is this for all links that you click, or a specific link that you're clicking where you see this behaviour?

Flags: needinfo?(busy1)

I apologize for not being more specific.

The most irritating problem occurs primarily when I choose Manage Bookmarks in order to open multiple links in new tabs in FF.

On the Manage Bookmarks page, when I click on a selected link to open in a new tab, the new tab is created and the the selected link opens immediately. I don’t always want to switch immediately; I want to stay on the Bookmarks page to select other links to view also. I don’t want to constantly switch back and forth between the Bookmarks page and the FF window with the tabs of chosen links.

Also, if I’m on an article web page/web site that contains a link that I want to visit, the link opens immediately on the page I’m viewing. Alternatively, I use the right button on my logitech mouse to select "open the link in a new tab", which happens more often than not. When doing a “search" with multiple results, I want to review several responses, so I have to select “open link in a new tab” with each link.

Could you offer an option in Preferences to “save/create link in a new tab” to be activated when a link is clicked on, that works for both Bookmarks and FF? Could the default be changed to create the tab without switching immediately?

I hope this explanation helps.

Flags: needinfo?(busy1)

It does a little bit - although I'm curious about what you mean by "Manage Bookmarks" page. What page is this? We have a separate "Library" window that lets you manage your bookmarks. I'm not aware of any in-content bookmarks management UI that ships in Firefox by default. Is this management UI from an add-on that you've installed? Would you be able to show me a screenshot of it (feel free to redact or omit your actual bookmarks from it) so I can be sure of what you're referring to?

Flags: needinfo?(busy1)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #4)

It does a little bit - although I'm curious about what you mean by "Manage Bookmarks" page. What page is this?

I think they mean the library window - the bookmarks menu labels it "manage bookmarks". I'm morphing this bug based on this interpretation (bracketed edits are mine):

(In reply to busy1 from comment #3)

On the Manage Bookmarks [window], when I click on a selected link to open in a new tab, the new tab is created and the the selected link opens immediately. I don’t always want to switch immediately; I want to stay on the Bookmarks [window] to select other links to view also. I don’t want to constantly switch back and forth between the Bookmarks [window] and the FF window with the tabs of chosen links.

It's maybe useful to note that bookmarks don't use the default pref, but use browser.tabs.loadBookmarksInBackground (in about:config, set to false by default) to avoid selecting the opened tab. The fact that this is a separate pref is already on file as bug 469456.

That still doesn't change that opening the page will refocus the main browser window though.

Moving this to the bookmarks & history component so folks there can have a look to see if there's anything to be done about the manage bookmarks in-window behaviour. I guess if we opened the library in a tab, this problem would go away...

Component: Preferences → Bookmarks & History
Flags: needinfo?(busy1)
Summary: FF-Preferences-General-Tabs (Settings) 3rd line: Even when box unchecked, link switches immediately → Bookmarks opened from the library force the browser window to the front

Opening a single bookmark or history entry from the Library window will
focus the top browser window, even if the loadInBackground parameter is
true (e.g., user is trying to open several bookmarks).
PlacesUIUtils.openTabset doesn't have this problem, just openLinkIn.
Still focus if where is "current" or loadInBackground is false.

I will change the status to NEW, because I managed to reproduce the issue on Firefox 99.0, Firefox 100.0, Firefox 101.0b9 and Nightly 102.0a1 using macOS 10.15, Ubuntu 18.04 x64 and Windows 10 x64.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

Adding needinfo for me to look at the WIP patch, which phab didn't ping me for. :-(

Flags: needinfo?(gijskruitbosch+bugs)
Duplicate of this bug: 1888155
See Also: → 1894279
Duplicate of this bug: 1894279
See Also: 1894279

Huh, this patch got very lost. :-(

Shane, do you just want to actually ask for review here? Looks like it needs rebasing in any event...

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(shughes)
Summary: Bookmarks opened from the library force the browser window to the front → Bookmarks and history items opened from the library force the browser window to the front

(In reply to :Gijs (he/him) from comment #11)

Huh, this patch got very lost. :-(

Shane, do you just want to actually ask for review here? Looks like it needs rebasing in any event...

Ha, I forgot about this too. I'll resubmit it with a test.

Flags: needinfo?(shughes)
Assignee: nobody → shughes
Status: NEW → ASSIGNED
Attachment #9276397 - Attachment is obsolete: true
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d16ac4c1714c Don't focus target window when opening a background tab in it. r=Gijs,places-reviewers

Backed out for causing mochitests failures in browser_library_open_bookmark.js.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_library_open_bookmark.js | Library window is not focused - Didn't expect [object Window], but got it
Flags: needinfo?(shughes)

Thanks, I'll look into the failure. The failure screenshot bizarrely shows that the correct window is focused. Maybe the method I'm using to check the focused window behaves differently on Linux.

Edit: Actually, looking at the titlebars, it looks like the library window is focused but somehow behind the main window. I didn't know this was a possibility. I'll try Services.focus.activeWindow instead of checking the most recent window.

Flags: needinfo?(shughes)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: