Bug 16331 - [Gtk] no focus when button/checkbox/radiobutton clicked, only when tabbed
Summary: [Gtk] no focus when button/checkbox/radiobutton clicked, only when tabbed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Gtk (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-12-06 10:50 PST by Jakub 'Livio' Rusinek
Modified: 2008-10-27 13:44 PDT (History)
2 users (show)

See Also:


Attachments
Example showing how onfocus does not fire when button is clicked. (301 bytes, text/html)
2008-01-19 18:35 PST, Garrett Smith
no flags Details
Obey GTK+ focus conventions (3.23 KB, patch)
2008-09-22 17:57 PDT, Alp Toker
hyatt: review+
Details | Formatted Diff | Diff
border issue (21.08 KB, image/jpeg)
2008-09-23 10:38 PDT, Dirk Schulze
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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))