Improve support for non-gnome Input methods

Bug #32891 reported by Tristan Wibberley
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Firefox text entry widgets do not support input methods like other gnome desktop text entry widgets.

To reproduce: find a webpage with a form with a text entry widget, right click on it, note how the input methods submenu is not displayed.

Revision history for this message
In , kz (keizie) wrote :

this post means:
gtk2 support dynamic change of imput methods by context menu.
and there's no context menuitem for the change in mozilla textarea or input::text.
so cannot change input methods on the fly.

Revision history for this message
In , Tetsuroy (tetsuroy) wrote :

shanjian: do you know what does he mean? Do we have problem in Linux-IME?

Revision history for this message
In , Masaki (masaki-katakai) wrote :

Currently XIM support is disabled in GTK2 due to the problem
of bug 176514. We should mark this as invalid or dup.

Revision history for this message
In , Thacker (thacker) wrote :

XIM is enabled, so this is relevant.

gtk2 by default on all text input areas has certain options on the menu that
pops up when you right-click. These options allow one to select the current
input method, and enter certain special Unicode control characters as well.
mozilla has completely replaced the gtk2 menus with its own menu, removing this
functionality.

This means that it's impossible for users to change the current input method
while running mozilla. The only way to change the input method is to quit
mozilla and restart it with the GTK_IM_MODULE environment variable set to
something different.

In fact, many users might not realize that they can set the GTK_IM_MODULE
variable. (e.g., export GTK_IM_MODULE=xim for XIM) If they don't know this,
then they won't be able to use any input method at all. Perhaps it should be in
the release notes.

Revision history for this message
In , Jshin1987 (jshin1987) wrote :

Would it be possible to add the menu for gtk2 input module selection to the
Mozilla's menu (for textinput area)? How about adding a pref. entry to disable
Mozilla's menu so that in its place gtk2 input module menu pops up on
right-clicking? Yet another possibility is to bind the gtk2 input module menu to
something other than right-clicking (if that's possible) such as
shift+right-clicking. Or, we can do the other way around binding Mozilla's menu
to shift+right-clicking while keeping gtk2's.

I'm just thinking loud here...

Owen, does any of what I wrote above make sense?

Revision history for this message
In , Blizzard (blizzard) wrote :

I'm not sure how much work it is to do that. I've never looked into what it
would take. Right now we just have a single input context for the entire
browser window, so things could be challenging as well.

This might be a good impetus to have input contexts on only the various text
boxes. Of course, that might cause problems with findasyoutype. Sigh.

Revision history for this message
In , An9n (an9n) wrote :

Support of gtk2 input module selection would be a nice step forward, since XIM
is more or less dependent on setting the LANG variable.

IMHO, it is not correct to use LANG to set _input method_, though obviously it
sometimes coincides. This use of LANG is not internationalization in the
multilingual sense, just multi-monolingual.

So, supporting an more flexible and already working way of selecting input
methods would be very welcome!

Revision history for this message
In , Ftang (ftang) wrote :

shanjian is no longer working on mozilla for 2 years and these bugs are still
here. Mark them won't fix. If you want to reopen it, find a good owner first.

Revision history for this message
In , Jshin1987 (jshin1987) wrote :

give it to blizzard for now

Revision history for this message
In , Cloveious (cloveious) wrote :

Mass Reassign Please excuse the spam

Revision history for this message
Tristan Wibberley (tristan-wibberley) wrote : Input methods not supported

Firefox text entry widgets do not support input methods like other gnome desktop text entry widgets.

To reproduce: find a webpage with a form with a text entry widget, right click on it, note how the input methods submenu is not displayed.

Changed in firefox:
assignee: nobody → ijackson
Revision history for this message
Ming Hua (minghua) wrote :

For your information:

All GTK input methods should have a label string. A workaround for this issue is running firefox with the environment variable GTK_IM_MODULE set to the label string. For example, to use X input method, instead of choosing the "X Input Method" in the right-click menu, you can invoke firefox with:
    $ GTK_IM_MODULE=xim firefox

I believe this label string can be found in file /etc/gtk-2.0/gtk.immodules.

Revision history for this message
In , Mozilla-bugzilla (mozilla-bugzilla) wrote :

I understand that the way to do it is:
1. Make the XUL popup menu implement GtkMenuShell.
2. Populate it with gtk_im_multicontext_append_menuitems.

Revision history for this message
In , c7d2f5c8667d26fffd5e7772d632c76d (c7d2f5c8667d26fffd5e7772d632c76d-deactivatedaccount) wrote :

(In reply to comment #11)
> I understand that the way to do it is:
> 1. Make the XUL popup menu implement GtkMenuShell.
> 2. Populate it with gtk_im_multicontext_append_menuitems.

That will only work for XUL-using applications. Embedders need a way to get at the Gtk IM context.

Revision history for this message
In , 62kmw3t2fpt6do3 (62kmw3t2fpt6do3) wrote :

Hello everyones,
I confirm this bug his really anoying fore people using more than one input method system at a time.
I use scim with anthy to write in Japanese and XIM with unikey or gtk-unikey to write in Vietnamese. Because it is not possible to change the input method direcly in Firefox I need to close all instances of Firefox and reopen with the right GTK_IM_MODULE variable set.

The discussion is on how to implement the input method switch for every input box. I suggest you simplify the problem by just giving one gtk-box somewhere (for exemple it could be an element of the toolbar).
When wanting to change input-method a right click on this box of the toolbar and it is changed for all Firefox. (^^)

Maybe see bug 247777 that speaks about pango and seems to be a cue for you.
Thanks all for your work, I would be so happy to see this bug fixed.

Guillaume

Ian Jackson (ijackson)
Changed in firefox:
assignee: ijackson → nobody
David Farning (dfarning)
Changed in firefox:
assignee: nobody → mozillabugs
Revision history for this message
Rolf Leggewie (r0lf) wrote : Re: Input methods not supported

Confirming, but with lower importance as there are several easy workarounds.

Changed in firefox:
importance: Medium → Low
status: Unconfirmed → Confirmed
David Farning (dfarning)
Changed in firefox:
assignee: mozillateam → mozilla-bugs
Revision history for this message
Alexander Sack (asac) wrote :

maybe there is an upstream bug that deals with how to improve input method support in non-gnome environments.

Revision history for this message
Srivatsa Kanchi R (srivatsak) wrote :

I confirm this bug

Revision history for this message
Ming Hua (minghua) wrote :

This is not about input method support in non-GNOME environment, because the symptom is the same in GNOME environment as well. The complaint is firefox's text input widget/area doesn't have a right-click menu entry to let the user change the input method, while most other GTK+ based apps do (the ones with text input area anyway).

The related upstream bug should be https://bugzilla.mozilla.org/show_bug.cgi?id=164793.

Alexander Sack (asac)
Changed in firefox:
status: Confirmed → In Progress
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
Srivatsa Kanchi R (srivatsak) wrote :

Instead of passing the environment variable on the command line, edit the file ~/.mozilla/firefox/rc and the below lines:
MOZ_DISABLE_PANGO=0
GTK_IM_MODULE=scim
export GTK_IM_MODULE

every time firefox is invoked this file is read avoiding the to provide on the command line

Alexander Sack (asac)
Changed in firefox:
assignee: mozilla-bugs → nobody
status: In Progress → Triaged
Changed in firefox-3.0:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Micah Gersten (micahg) wrote :

No more fixes will occur for FF2.

Changed in firefox (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
In , dullboy (dullgiulio) wrote :

This is going to be fixed on Chrome, see http://code.google.com/p/chromium/issues/detail?id=31008

I also consider this bug annoying, albeit minor.

Revision history for this message
In , Masayuki (masayuki) wrote :

*** Bug 247777 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Masayuki (masayuki) wrote :

Created an attachment (id=422912)
Patch v0.1

This patch succeeded to change the IM by hidden menu.

So, we can append some native menus to our XUL menu. But I need to implement the mechanism. I'll try to fix this bug after bug 520732.

Changed in firefox:
importance: Unknown → Medium
no longer affects: firefox-3.0 (Ubuntu)
Changed in firefox (Ubuntu):
status: Won't Fix → Triaged
Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Masayuki (masayuki) wrote :

Moving all open keyboard/IME handling bugs to DOM: UI Events & Focus Handling component.

Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.