Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 44975cdcef67f525328f49e337221201f6c3148b
https://github.com/WebKit/WebKit/commit/44975cdcef67f525328f49e337221201f6c3148b
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-04 (Sat, 04 Jul 2026)
Changed paths:
M Source/WebCore/platform/PlatformKeyboardEvent.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
Log Message:
-----------
PlatformKeyboardEvent::syntheticEventFromText fails to synthesize "{" due to
trailing space in lookup table key
https://bugs.webkit.org/show_bug.cgi?id=318573
rdar://181341300
Reviewed by Abrar Rahman Protyasha and Wenson Hsieh.
The "{" entry in nonAlphaNumericKeys() was keyed under "{ " (trailing
space) in both the map key and the text field, unlike every neighboring
punctuation entry. As a result, a "{" lookup missed the table, fell
through the alphanumeric branches, and returned nullopt, so the key
could never be synthesized (this is the only client of the table, used
by the TextExtraction key-press interaction).
Drop the stray space so the key and inserted text are both "{".
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
* Source/WebCore/platform/PlatformKeyboardEvent.cpp:
(WebCore::nonAlphaNumericKeys):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::(TextExtractionTests, KeyPressInsertsCharactersInOrder)):
(TestWebKitAPI::(TextExtractionTests, KeyPressInsertsBracketCharacters)):
Canonical link: https://commits.webkit.org/316506@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications