Closed
Bug 774352
Opened 12 years ago
Closed 12 years ago
Align tab opening behavior with desktop Firefox
Categories
(Firefox for Metro Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jwilde, Assigned: jwilde)
References
Details
(Whiteboard: completed-elm)
Attachments
(1 file)
(deleted),
text/html
|
Details |
Right now, Metro Firefox defaults to opening new tabs whenever you type a URL into the URL bar or whenever you click on links. Pages will only open in the current tab if and only if the page uses the HTML5 History API to modify the URL.
This is controlled by this line:
https://mxr.mozilla.org/projects-central/source/elm/browser/metro/base/content/browser.js#501
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jonathan
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Turns out that this bug is actually related to going single-process. To ensure that all links clicked on chrome pages (e.g. about:home) open in new tabs, there's an extra handler for DOMActivated that makes all http/https links open in new tabs.
Chrome pages are detected by determining if the current page is in the parent process. Because we're single-process, *every* page is in the parent process, causing link opening (and a few other functions, like drag events) to fail.
I'm going to switch chrome page detection over to a less robust system similar to what prior revisions of content.js in fennec-xul did: check if top.location has a local URI scheme (about:).
Assignee | ||
Comment 2•12 years ago
|
||
Put together a quick test case since I couldn't think of any web pages off the top of my head that used target="_blank" to load new tabs.
Assignee | ||
Comment 3•12 years ago
|
||
Whiteboard: completed-elm
Assignee | ||
Comment 5•12 years ago
|
||
Issue that's still a problem: the DOMActivate listener will cause new tabs to open when you type in a URL when you have a chrome page in your selected tab.
Opening new tabs when links are clicked from chrome pages as the default through content.js seems hacky. The chrome pages themselves ought to use link targets (and/or message passing) properly to open new tabs if needed, given that they're privileged.
I can assemble a patch to remove this for once, so we don't have to trip over this in the future. Thoughts?
Comment 6•12 years ago
|
||
(In reply to Jonathan Wilde [:jwilde] from comment #5)
> Issue that's still a problem: the DOMActivate listener will cause new tabs
> to open when you type in a URL when you have a chrome page in your selected
> tab.
>
> Opening new tabs when links are clicked from chrome pages as the default
> through content.js seems hacky. The chrome pages themselves ought to use
> link targets (and/or message passing) properly to open new tabs if needed,
> given that they're privileged.
>
> I can assemble a patch to remove this for once, so we don't have to trip
> over this in the future. Thoughts?
I think this is good. If and when we go back to oopc, issues that forced us to do these new tab from chrome hacks should be addressed properly. For example you should be able to open a remote tab in a chrome tab.
Assignee | ||
Comment 7•12 years ago
|
||
Assignee | ||
Comment 8•12 years ago
|
||
Missed a point where this was being implemented. New tabs should no longer be arbitrarily be generated.
http://hg.mozilla.org/projects/elm/rev/dd719b5576ee
Updated•12 years ago
|
Product: Firefox → Firefox for Metro
Version: unspecified → Trunk
Comment 9•12 years ago
|
||
Resolving bugs in the Firefox for Metro product that are fixed on the elm branch. Sorry for the bugspam. Search your email for "bugspam-elm" if you want to find and delete all of these messages at once.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
OS: Windows 8 Metro → Windows 8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•