Closed
Bug 1404858
Opened 7 years ago
Closed 2 years ago
Site depends on broken webkit/blink mis-handling of target on javascript: links
Categories
(Web Compatibility :: Site Reports, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stemind, Unassigned)
References
()
Details
(Keywords: parity-chrome, parity-safari, webcompat:site-wait, Whiteboard: [sitewait])
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170824053622 Steps to reproduce: 1. Surf to https://uptownbigband.ch 2. Click the dark green alphorn photo (upper left on the page; click the foto, not the text link) Actual results: Two tabs are opened instead of one Expected results: One tab should be opened. I. E. target-attribute must not be interpreted if javascript: pseudo protocol is used in href-attribute.
The dark green alphorn foto is on the upper RIGHT on the page.
Comment 2•7 years ago
|
||
it doesn't open a tab for "javascript:" on webkit and chrome.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Firefox → Core
Whiteboard: [parity-webkit][parity-chrome]
Updated•7 years ago
|
Component: Untriaged → DOM
Updated•7 years ago
|
Priority: -- → P3
Comment 3•7 years ago
|
||
It does open a tab for javascript: on Chrome, but why there aren't two. Hmm, does Chrome execute the JS in the current window, and we open a new one and execute there. bz, you've dealt with javascript: protocol. Do you by any chance recall this stuff. If not, I'll dig in some more.
Flags: needinfo?(bzbarsky)
Comment 4•7 years ago
|
||
As far as I see, we follow the spec https://html.spec.whatwg.org/#following-hyperlinks-2 New browsing context is created in step 7, and javascript: gets executed in 14. Reporter, could you file a bug on Chromium and Webkit? And inform the web site about broken behavior? In this case I think our behavior is saner, so I don't think the spec should be changed.
Flags: needinfo?(bzbarsky)
Comment 5•7 years ago
|
||
Chrome is totally broken around targeted javascript:, yes (and various other aspects of javascript: loading). In particular, you're correct that it runs the javascript: in the wrong window in this case. I thought I'd reported this to Blink at some point, but I'm not finding it right now. Maybe I just pointed it out in email... Comment 4 is correct that we're doing the right thing here, per spec and sanity. The site needs to be fixed.
Component: DOM → Desktop
Product: Core → Tech Evangelism
Version: 55 Branch → Firefox 55
Comment 6•7 years ago
|
||
I filed https://bugs.webkit.org/show_bug.cgi?id=178145 and https://bugs.chromium.org/p/chromium/issues/detail?id=773468
Updated•7 years ago
|
Summary: href=javascript:window.open should not interprete target attribute → Site depends on broken webkit/blink mis-handling of target on javascript: links
Comment 7•7 years ago
|
||
To fix this, they can change: <a href="javascript:window.open('http://alphornbigband.ch');" target="_blank"> <img style="width:200px;" src="f.php?f=r/alphornbigband/alphornbigband_de.jpg?t=1504989024"> </a> to: <a href="https://alphornbigband.ch" target="_blank"> <img style="width:200px;" src="f.php?f=r/alphornbigband/alphornbigband_de.jpg?t=1504989024"> </a> Karl, could you try to get in touch please?
Flags: needinfo?(kdubost)
Priority: P3 → P1
Whiteboard: [parity-webkit][parity-chrome] → [parity-webkit][parity-chrome][needscontact]
Comment 8•7 years ago
|
||
Contacted today with the fix to their email address in the footer of the site. Thanks everyone for the quick analysis and suggested fix.
Flags: needinfo?(kdubost)
Whiteboard: [parity-webkit][parity-chrome][needscontact] → [parity-webkit][parity-chrome][sitewait]
Comment 9•6 years ago
|
||
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome,
parity-safari
Whiteboard: [parity-webkit][parity-chrome][sitewait] → [sitewait]
Assignee | ||
Updated•5 years ago
|
Product: Tech Evangelism → Web Compatibility
Comment 10•5 years ago
|
||
See bug 1547409. Moving webcompat whiteboard tags to keywords.
Keywords: webcompat:site-wait
Comment 11•2 years ago
|
||
The site has been updated with the code from comment 7.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•