Bug 43602

Summary: [gtk] gtk_im_context_focus_in() should only be called when an input-able element has focus
Product: WebKit Reporter: Brian Tarricone <bjt23>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Macintosh Intel   
OS: Linux   
Attachments:
Description Flags
Patch for this issue none

Description Brian Tarricone 2010-08-05 19:23:08 PDT
We have an on-screen keyboard that is implemented as a Gtk IM module.  The change in Martin's commit 14a3dc3801b495632521c557be1091e79b996b03 that adds a call to gtk_im_context_focus_in() in webkitwebview.cpp:webkit_web_view_focus_in_event() causes the keyboard to pop up all the time, whenever the web view is focused, even if there are no actual editable/input-able elements on the page.

Not sure what the best fix is; commenting out those lines makes the situation better, but there are still some problems.  I'm thinking it should be checking the type of the focused DOM node, and only enable it if it's something that can accept keyboard input.  But not sure how to do that just yet.
Comment 1 Brian Tarricone 2010-08-05 19:31:41 PDT
Oh, that's svn rev r56072 for the git-impaired ^_^
Comment 2 Martin Robinson 2010-08-06 09:59:08 PDT
Created attachment 63735 [details]
Patch for this issue
Comment 3 Martin Robinson 2010-08-06 10:00:10 PDT
Thanks for reporting this Brian! I've uploaded a patch for this issue, but I do not think I can test it locally. Do you mind testing it for yourself? If it works, I'll mark it r?.
Comment 4 Brian Tarricone 2010-08-06 14:05:58 PDT
Works perfectly, thanks Martin!
Comment 5 Xan Lopez 2010-08-09 08:19:56 PDT
Comment on attachment 63735 [details]
Patch for this issue

r=me
Comment 6 Martin Robinson 2010-08-09 08:50:23 PDT
Comment on attachment 63735 [details]
Patch for this issue

Clearing flags on attachment: 63735

Committed r64983: <http://trac.webkit.org/changeset/64983>
Comment 7 Martin Robinson 2010-08-09 08:50:27 PDT
All reviewed patches have been landed.  Closing bug.