Bug 18425 - Link doesn't receive focus when clicked
Summary: Link doesn't receive focus when clicked
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Nobody
URL: http://elinfranzen.com/skien/
Keywords: BrowserCompat, InRadar
: 22233 52102 60946 (view as bug list)
Depends on:
Blocks: 26856
  Show dependency treegraph
 
Reported: 2008-04-11 02:34 PDT by arnebe
Modified: 2024-03-21 01:15 PDT (History)
13 users (show)

See Also:


Attachments
reduction (424 bytes, text/html)
2008-04-11 06:23 PDT, Marcus
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description arnebe 2008-04-11 02:34:16 PDT
the a:focus class does not show on links.
Test clicking items in the menu. They are left bold when clicked in ff2/3, explorer7, omniweb 5.7 etc.
Comment 1 Marcus 2008-04-11 06:23:39 PDT
Created attachment 20477 [details]
reduction

Added a reduction. A better title for this bug might be: Link doesn't receive focus when clicked. Maybe this is intentional?

By the way, IE 7 ignores :focus but uses the pseudo class :active as if it was :focus.
Comment 2 arnebe 2008-04-11 08:41:44 PDT
Its not intentional for this site, since I made it.
Comment 3 arnebe 2008-04-11 08:43:09 PDT
Thanks! Its not intentional for this site, since I made it.
Comment 4 Alejandro Araneda 2008-11-08 10:29:43 PST
This bug also occurs in Safari / Windows. Links only receive focus with TAB key navigation (if this option is activated). 
In both Firefox and Opera, links receive focus when activated.
In IE, a:focus doesn't work. Instead, a:active works after mouseup.
This is a request in order to implement some kind of cross-browser ":onclick" 
Comment 5 Gérard Talbot 2009-06-14 15:39:12 PDT
I also confirm this bug. It still happens in latest stable release Safari 4.0
build 530.17.

Focused links with mouse-clicking does not render outline borders. 
This also affects CSS rules like:

a:focus
{
outline-width: 4px;
outline-style: solid;
outline-color: red;
}

Other testcases:


http://samples.msdn.microsoft.com/ietestcenter/frame_holder.htm?url=./css/chapter_18/Rules/outline-pseudo-selector-001.htm

CSS2 Test Suite (draft): 5.11.3 :active, :hover, and :focus from Eric Meyer
http://meyerweb.com/eric/css/tests/css2/sec05-11-03.htm

CSS 2.1 Conformance test suite (section 5.11.3 focusing links):
http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/t051103-c21-focus-ln-00-e-i.htm

IE 8 supports a:focus.

regards, Gérard
Comment 6 Francois 2009-09-24 08:54:07 PDT
Uncomfirmed?  "Well known" would be more like it.  

See, for example, Stu Nicholls:

"This use the :active and :focus states to hold a clicked image on the page until another mouse click is made, but Safari and Google Chrome handle mouse clicks in a different way to other browsers so the image will only stay on screen in these two browsers whilst the mouse key is held down,"

http://www.cssplay.co.uk/menu/vertical-slide.html#nogo


This bug doesn't just apply to OSX10  -  I'm on windows XP and windows vista.
Comment 7 Viatcheslav Ostapenko 2009-09-28 09:26:42 PDT
Patch submitted here: https://bugs.webkit.org/show_bug.cgi?id=22261
Comment 8 Alexey Proskuryakov 2011-01-08 14:03:24 PST

*** This bug has been marked as a duplicate of bug 22261 ***
Comment 9 Alexey Proskuryakov 2011-01-08 14:06:55 PST
Oops, wrongly duped.
Comment 10 Alexey Proskuryakov 2011-01-08 14:07:12 PST
*** Bug 52102 has been marked as a duplicate of this bug. ***
Comment 11 Alexey Proskuryakov 2011-01-08 14:07:18 PST
*** Bug 22233 has been marked as a duplicate of this bug. ***
Comment 12 Dominic Cooney 2011-05-18 19:23:58 PDT
*** Bug 60946 has been marked as a duplicate of this bug. ***
Comment 13 Brent Fulgham 2022-07-11 16:23:04 PDT
This seems to still be an issue in Safari 15.
Comment 14 Radar WebKit Bug Importer 2022-07-11 16:23:15 PDT
<rdar://problem/96849661>
Comment 15 Ahmad Saleem 2023-10-03 08:42:05 PDT
Still reproducible on WebKit ToT [268769@main] (Focus does not change to 'green' - while Chrome Canary 119 and Firefox Nightly 120 works fine).

Adding 'BrowserCompat' tag.
Comment 16 Ahmad Saleem 2024-03-21 01:15:38 PDT
@Aditya - looking into your commit: https://commits.webkit.org/273247@main

and reading commit log:

"anchor elements are not mouse focusable, following Cocoa platform convention."

Will this bug becomes 'Not Applicable'?