[Webkit-unassigned] [Bug 178145] New: Anchor targeting does not work right with javascript: URLs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 10 14:32:10 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=178145

            Bug ID: 178145
           Summary: Anchor targeting does not work right with javascript:
                    URLs
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bzbarsky at mit.edu
                CC: cdumez at apple.com

STEPS TO REPRODUCE:

1. Load the testcase.
2. Click the link.

EXPECTED RESULTS: The alert should say "Should be about:blank: about:blank"

ACTUAL RESULTS: The alert says: "Should be about:blank: XXXX" where XXXX is the actual url of the testcase page.

ADDITIONAL INFORMATION: The HTML spec is pretty clear on this: the target is used to find the right browsing context before any script gets run, and then it runs in the current window in the target browsing context.  Safari is running it in the wrong window.

Note, in particular, that this:

  <a href="javascript:alert(location.href)" target="_blank">Click me</a>

should open a new window and then run the JS in there, which Safari also doesn't do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171010/30c798a5/attachment.html>


More information about the webkit-unassigned mailing list