After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608225 - GtkHtml doesn't deal well with not constant value of cursor_pos in function call gtk_im_context_get_preedit_string from ibus input method framework.
GtkHtml doesn't deal well with not constant value of cursor_pos in function c...
Status: RESOLVED WONTFIX
Product: GtkHtml
Classification: Other
Component: Editing
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkhtml-maintainers
gtkhtml-maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2010-01-27 06:22 UTC by Peng Wu
Modified: 2017-02-09 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to remember the changed cursor_pos and change it back before html_engine_paste_text/commit. (2.18 KB, patch)
2010-01-27 06:22 UTC, Peng Wu
none Details | Review

Description Peng Wu 2010-01-27 06:22:31 UTC
Created attachment 152382 [details] [review]
Patch to remember the changed cursor_pos and change it back before html_engine_paste_text/commit.

In the past, input method framework like scim never change the cursor_pos value of function call gtk_im_context_get_preedit_string.
In scim, the cursor of preedit text is marked by using a black background color (use pango attr) to mark the cursor, and don't change cursor_pos value from the function gtk_im_context_get_preedit_string.

But with ibus 1.2.0 and ibus-pinyin 1.2.99, the new input method framework start to use the cursor_pos, and return not constant and sometimes non-zero value.

I checked gtkhtml code, it seems that when receive the non-zero value from get_preedit_string, it will move cursor immediately.
And when im_context commit the preedit string, the cursor has been moved some characters forwards, move forward than the actual input position.
The new input will show some characters later than the right position.

See bug report:
http://code.google.com/p/ibus/issues/detail?id=739

I made the patch and test it, by using a git clone from git.gnome.org.
The patch will remember the sum of cursor_pos, and will move the cursor backward before html_engine_paste.
Please review the patch, thanks.
Comment 1 shallpion 2010-03-10 23:04:59 UTC
Any progress on this bug report ? :( It is really annoying and stops me from using evolution normally.
Comment 2 Pacho Ramos 2010-03-12 08:56:47 UTC
Some people under Gentoo seems to be also affected by this:
http://bugs.gentoo.org/show_bug.cgi?id=308591
Comment 3 Pacho Ramos 2010-10-10 22:52:01 UTC
Can anybody take a look on this? Seems that 3.32 could still require this. Thanks
Comment 4 André Klapper 2012-02-03 14:10:14 UTC
Comment on attachment 152382 [details] [review]
Patch to remember the changed cursor_pos and change it back before html_engine_paste_text/commit.

[Setting "patch" flag and correcting mime type so this can actually be queried for.]
Comment 5 André Klapper 2017-02-09 13:37:24 UTC
GtkHtml is not under active development anymore. 
Evolution (its main consumer) switched to a WebKit backend a while ago. 
It is currently unlikely that there will be any further GtkHtml development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping (bug 778387) to reflect reality. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again.