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 62948 - Uncommitted text not committed on mnemonic activation
Uncommitted text not committed on mnemonic activation
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Input Methods
1.3.x
Other Linux
: Normal normal
: Medium fix
Assigned To: gtk-bugs
gtk-bugs
AP2
: 91841 102176 107833 315374 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-10-24 18:44 UTC by Owen Taylor
Modified: 2016-05-24 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2001-10-24 18:44:28 UTC
If an entry or textview has uncommitted text from an input
method and you perform a action that extracts the text without
focusing out of the widget, then the uncommitted text 
will be missing.

For example, bring up the file selection in testgtk
select, as the input method "Cyrillic (translit)", click
in the entry and type "ABC", then hit Alt-O to activate
the OK buttton. The text that testgtk extracts from the
filesel is "AB", not "ABC".

Solutions to this include:

 - Make sure that any input method, including GtkIMContextSimple,
   that supports preedit, has a "commit" key. (Put the
   burden on the user.)

 - Add gtk_entry_commit_preedited_text() 
   gtk_text_view_commit_preedited_text. (Put the burden on
   the programmer.)

 - Make the preedit text be returned by gtk_entry_get_text();
   this works reasonably well, but I don't see how we
   can extend it to GtkTextView - the preedit text isn't
   part of the buffer so we can't make it visible to the
   programmer.

 - Make gtk_entry_get_text() do a gtk_im_context_reset()
   Bad, since getters like gtk_entry_get_text() shouldn't 
   have a user visible effect.

 - Make mnemonic and accelerator activation send some
   sort of event to the currently focused widget to tell
   it to "finish" what it is doing, which would normally
   mean doing a gtk_im_context_reset(). Would we still
   have a problem with menu items activated through
   the mouse though, since we don't get a focus-out there?
I don't like any of others, so I'm inclined to go low-tech
and say we should just do the first solution,
Comment 1 Owen Taylor 2002-08-28 14:17:01 UTC
*** Bug 91841 has been marked as a duplicate of this bug. ***
Comment 2 Owen Taylor 2002-12-30 01:44:40 UTC
*** Bug 102176 has been marked as a duplicate of this bug. ***
Comment 3 Owen Taylor 2003-03-07 17:03:31 UTC
*** Bug 107833 has been marked as a duplicate of this bug. ***
Comment 4 Calum Benson 2004-10-21 12:48:30 UTC
Adding keynav keyword.
Comment 5 Calum Benson 2004-10-21 16:18:35 UTC
Marking AP2 to reflect accessibility impact.
Comment 6 Calum Benson 2004-10-21 16:41:02 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 7 Owen Taylor 2005-09-06 19:31:16 UTC
*** Bug 315374 has been marked as a duplicate of this bug. ***
Comment 8 Hrvoje Niksic 2005-09-06 19:53:48 UTC
Please don't put the burden on the user by requiring an explicit "commit" key. 
It would make many input methods much harder to use because of something that is
ultimately a detail of the implementation.

Wouldn't a better solution be to have any keypress (or user-initiated event such
as buttonpress or menu item selection) not part of the IM sequence interrupt the
sequence?  I.e. Alt-O should cause "C" to be inserted in the buffer, just like
return should in my example from bug 315374.

That solution would pose no additional burden to either the programmer or the
user, while maintaining the integrity of the getters.
Comment 9 Calum Benson 2006-04-26 17:13:03 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 10 Matthias Clasen 2016-05-24 11:31:38 UTC
as owen said back in 2001, lets declare this the input methods/users problem