Bug 250208

Summary: [GTK] delete surrounding text doesn't seem to work
Product: WebKit Reporter: ermshiperete <eb1>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, marc
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
URL: https://github.com/keymanapp/keyman/issues/7971

Description ermshiperete 2023-01-06 07:49:36 PST
It seems that deleting surrounding text doesn't work when typing with an IME that makes use of surrounding text, e.g. ibus-engine-keyman (https://keyman.com).

Ubuntu 22.04 with Gnome Shell and X11, but also in other Ubuntu versions.

To reproduce:

- install Keyman 16.x together with the patched version of ibus from https://launchpad.net/~keymanapp/+archive/ubuntu/keyman-beta
- start km-config and download Vietnamese Telex keyboard
- in km-config in the Download dialog, switch to Vietnamese Telex keyboard and type `boo`
- alternatively, start WebKit minibrowser, load a webpage with a textfield (e.g. https://www.editpad.org/) and type `boo` (with Vietnamese Telex keyboard active)

Expected result:
`bô`

Actual result:
`boô`

Note that in the minibrowser things work correctly in the address bar, but not on a webpage.

When typing the second `o` Keyman sends the delete-surrounding signal to delete the first `o` (one character to the left of the IP) and then adds the `ô`.

Maybe relevant: 
https://bugs.webkit.org/show_bug.cgi?id=205716
https://bugs.webkit.org/show_bug.cgi?id=206352

See also: https://github.com/keymanapp/keyman/issues/7971