Bug 21309
Summary: | Image inside a javascript protocol link doesn't show | ||
---|---|---|---|
Product: | WebKit | Reporter: | Doeke Zanstra <doekman> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac (PowerPC) | ||
OS: | OS X 10.4 | ||
URL: | http://zanstra.com/x/webkit/qoop-img.html |
Doeke Zanstra
An image inside a link with an javascript-protocol url only returning void is not displayed. The markup:
<a href="javascript:void 0;"><img src="http://webkit.org/images/download.png"></a>
If the javascript protocol actually performs something, the image is displayed:
<a href="javascript:alert('hoi');void 0;"><img src="http://webkit.org/images/download.png"></a>
Real world usage: search results on www.qoop.nl (a Dutch collectors market place).
The URL points to a testcase (same as markup above). The first image doesn't show, but is expected to be shown.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I cannot reproduce this with shipping Safari/WebKit, or with a local debug build. It would also be extremely surprising for href attribute of an enclosing element to have any effect on image display.
Doeke Zanstra
Turns out this has to do with css-ad blocking from http://www.floppymoose.com.
The following CSS rule caused the problem.
A:link[HREF*="javascript:void"] IMG /*, ...more selectors...*/ { display: none ! important }
So it's not a Safari problem.