Bug 16331

Summary: [Gtk] no focus when button/checkbox/radiobutton clicked, only when tabbed
Product: WebKit Reporter: Jakub 'Livio' Rusinek <jakub.rusinek>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alp, krit
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Example showing how onfocus does not fire when button is clicked.
none
Obey GTK+ focus conventions
hyatt: review+
border issue none

Description Jakub 'Livio' Rusinek 2007-12-06 10:50:50 PST
when i push tab button, i see focus on those elements.
when i click them, and leave it - i see no focus. it's not gtk's default behavior.
Comment 1 Garrett Smith 2008-01-19 18:35:12 PST
Created attachment 18558 [details]
Example showing how onfocus does not fire when button is clicked.
Comment 2 Dave Hyatt 2008-01-19 18:58:21 PST
When fixing this make sure to ifdef it, since on Mac buttons are deliberately not mouse focusable (to match the OS).


Comment 3 Jasper Bryant-Greene 2008-03-27 03:50:57 PDT
Confirmed, I see the same behaviour. GTK+ conventions dictate that buttons should be focusable for the GTK port.
Comment 4 Alp Toker 2008-09-22 17:57:53 PDT
Created attachment 23687 [details]
Obey GTK+ focus conventions

Alternatively, we could do this by simply not overriding HTMLFormControlElement::isMouseFocusable() and HTMLAnchorElement::isMouseFocusable() but I figured it's better to avoid platform-specific sections in the header files.
Comment 5 Dave Hyatt 2008-09-22 19:43:27 PDT
Comment on attachment 23687 [details]
Obey GTK+ focus conventions

This is fine for now.  Eventually we could push such decisions to the RenderTheme maybe.
Comment 6 Alp Toker 2008-09-22 20:09:23 PDT
Landed in r36791.
Comment 7 Dirk Schulze 2008-09-23 10:38:13 PDT
Created attachment 23708 [details]
border issue

(In reply to comment #6)
> Landed in r36791.

I think it's this patch: I got blue borders arround links when I click on them with a border-width of 2-3 pixel. I think they are blue because of my blue theme. Look on the screenshot 'Bilder' on the top left.
Comment 8 Robin 2008-10-27 13:44:42 PDT
Button (still) not focussing on windows (safari),
the behaviour should not depend on operating system, so it should fire focus/blur events on mac as well.
(I as a web developer don't care what operating system my web application is on (the browser should handle it))