Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b2b4227bf36860deba3330f07003857ff6458a3b
      
https://github.com/WebKit/WebKit/commit/b2b4227bf36860deba3330f07003857ff6458a3b
  Author: Fujii Hironori <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp

  Log Message:
  -----------
  [GTK][WPE] Do not enable the input method for read-only text fields
https://bugs.webkit.org/show_bug.cgi?id=326478

Reviewed by Carlos Garcia Campos.

inputMethodStateForElement() returned a state for every text control, read-only
ones included. Read-only fields are focusable, so the embedder was told to open
a keyboard for a field that rejects edits.

Return no state for a read-only text control. The embedder sees a focus out, as
for any other element that does not use an input method, and key events reach
the page untouched. Do not report InhibitOnScreenKeyboard instead: embedders
may take that hint as a request to send raw key codes.

A disabled field cannot be focused, so it never gets here.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp

* Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp:
(WebKit::inputMethodStateForElement):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp:
(testWebKitInputMethodContextReadOnly):
(beforeAll):

Canonical link: https://commits.webkit.org/322832@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to