Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 75df801c372223a2dd89cabc04f4b7dde73d1cbd
https://github.com/WebKit/WebKit/commit/75df801c372223a2dd89cabc04f4b7dde73d1cbd
Author: Aditya Keerthi <[email protected]>
Date: 2023-10-27 (Fri, 27 Oct 2023)
Changed paths:
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewTextInput.mm
Log Message:
-----------
[Cocoa] Inserting empty text using system text input interfaces does not
delete the current selection
https://bugs.webkit.org/show_bug.cgi?id=263764
rdar://106570343
Reviewed by Wenson Hsieh.
Passing in an empty string to `-[NSResponder insertText:]` and
`-[UITextInput insertText:]` while there is a ranged selection should
perform backwards deletion, matching other system text engines.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
`Editor::insertTextWithoutSendingTextEvent` early returns when empty text is
passed in. In order to avoid affecting other codepaths, implement the logic in
`WebPage::insertTextAsync`, which a common entry point for system text input
insertion across Cocoa platforms.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewTextInput.mm:
(insertText):
(TEST):
Canonical link: https://commits.webkit.org/269858@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes