Bug 145607 - Clicking a link for a fragment scroll in a document with <base target="_blank"> opens in a new tab
Summary: Clicking a link for a fragment scroll in a document with <base target="_blank...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-03 09:21 PDT by Brady Eidson
Modified: 2015-06-03 21:32 PDT (History)
0 users

See Also:


Attachments
Test case (ready to be a layout test if this is actually a bug) (1.18 KB, text/html)
2015-06-03 10:55 PDT, Brady Eidson
no flags Details
Both main frame and iframe test (3.12 KB, text/plain)
2015-06-03 11:24 PDT, Brady Eidson
no flags Details
Both main frame and iframe test (3.12 KB, application/zip)
2015-06-03 11:25 PDT, Brady Eidson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2015-06-03 09:21:15 PDT
Clicking a link for a fragment scroll in a document with <base target="_blank"> opens in a new tab (in Safari)
 
I noticed this while fixing https://bugs.webkit.org/show_bug.cgi?id=145580

Unlike the broken cases in 145580, this one is not a regression - It's been around for as long as I can tell.
Comment 1 Brady Eidson 2015-06-03 10:55:21 PDT
Attaching a test case.

This actually happens in both Chrome (not too surprising) and Firefox (much more surprising)

So it *might* not be a bug. Need to research the <base> element.
Comment 2 Brady Eidson 2015-06-03 10:55:51 PDT
Created attachment 254187 [details]
Test case (ready to be a layout test if this is actually a bug)
Comment 3 Brady Eidson 2015-06-03 11:22:41 PDT
IE does this too.

So it's not weird from a compat standpoint.

Just weird from an expectational standpoint.

I'll try to read up on <base> at some point in the future, but won't explore any further for now.
Comment 4 Brady Eidson 2015-06-03 11:24:42 PDT
Created attachment 254188 [details]
Both main frame and iframe test

And just for posterity, I had an iframe version of the test as well.
Comment 5 Brady Eidson 2015-06-03 11:25:30 PDT
Created attachment 254189 [details]
Both main frame and iframe test

For posterity, iframe version of the test as well.
Comment 6 Brady Eidson 2015-06-03 21:32:44 PDT
The spec is pretty clear about this - Clicking a link with a <base target=""> element in place should open the URL in the target browsing context (in this case new), even if there's a fragment identifier.

Got it.