Bug 43154 - Anchor without href attribute loses CSS hover styles
Summary: Anchor without href attribute loses CSS hover styles
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 15:30 PDT by Darth
Modified: 2022-07-11 17:19 PDT (History)
4 users (show)

See Also:


Attachments
test (494 bytes, text/html)
2011-02-27 13:00 PST, Darth
no flags Details
test1 (wraps test in an iframe) (455 bytes, text/html)
2011-02-27 13:03 PST, Darth
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darth 2010-07-28 15:30:06 PDT
An anchor element without an href attribute looses its :hover css style on hover.
Bug on Google Chrome: http://code.google.com/p/chromium/issues/detail?id=47000

This works fine in Firefox.

EXPECTED: Hovering over an anchor <a> without an href= attribute should still trigger the :hover css styling.
Comment 1 Jakub Wieczorek 2010-07-28 15:59:55 PDT
:hover is intentionally ignored in quirks mode for anchors without the href attribute (in CSSStyleSelector::checkOneSelector()). It might make sense to change this if Firefox no longer has that quirk.
Comment 2 Darth 2010-07-28 17:14:57 PDT
Yeah seems to work fine in FF 3.6 without a href attribute.
Comment 3 Alexey Proskuryakov 2010-08-02 12:34:37 PDT
Does this work in IE?
Comment 4 Darth 2011-02-27 12:59:38 PST
Attaching 2 test cases.
test.html is a page with no DOCTYPE, hence in quirks mode.

Firefox 4 - :hover works
IE8/IE9 (Quirks mode aka IE5 mode) - :hover doesn't work
Webkit/Chrome - :hover doesn't work


test1.html is a parent that wraps test.html above in an iframe.
test1.html has a DOCTYPE html, hence rendered in standards mode.
For the iframe -

Firefox 4 - :hover works as before
IE8 (Quriks mode aka IE5 Mode) - :hover doesnt work
IE9 (Quirks mode BUT in IE9 engine) - :hover works
Webkit/Chrome - :hover doesn't work as before


Quirks mode in IE9 engine (a new mode that only IE team can add to make the lives of developers more miserable) is triggered when the top parent of the iframe is in IE9 document mode. The unholy determination chart can be seen here http://ieblog.members.winisp.net/misc/How%20IE9%20Determines%20Document%20Mode.svg
Comment 5 Darth 2011-02-27 13:00:04 PST
Created attachment 83988 [details]
test
Comment 6 Darth 2011-02-27 13:03:17 PST
Created attachment 83989 [details]
test1 (wraps test in an iframe)
Comment 7 Brent Fulgham 2022-07-11 17:19:44 PDT
Safari, Chrome, and Firefox show the same rendering behavior for this test case. I do not believe any further compatibility issue remains.