Page MenuHomePhabricator

VisualEditor does not allow to type with (at least some) input methods
Closed, ResolvedPublic

Description

In the visual editor, I cannot enter Japanse text at all because I cannot see the candidates which are normally shown by the input method. (A typical Japanese input method intercepts key events, shows candidate converted strings with kanji, and lets a user choose from them.)

My environment is Ubuntu 11.11 and IBus 1.3.99.20110818 with Anthy. I guess the same situation happens with other Japanese input methods, and other input methods which try to show candidate lists at large, including Chinese ones.

Most probably this is related to bugzilla:33056, but I'm filing separately, just in case.


Version: unspecified
Severity: normal

Details

Reference
bz33076

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:09 AM
bzimport set Reference to bz33076.

Similarly broken with Kotoeri Japanese IME on Mac OS X; first letter such as 't' or 'k' may sometimes come through, but I can't see any intermediate characters or selection candidates.

Broken with IBus Pinyin (Chinese) on Debian Wheezy as well, both on Iceweasel and Chromium but there're some difference:

In Iceweasel, nothing happens at all, whichever key I press (excluding arrow keys etc). In Chromium, the behavior is inconsistent:

(1) If I press a key that generates a characters with a single keypress (eg, "." which generates "。"), it works.
(2) If I use some i-commands (see IBus Pinyin doc, basically it pre-inserts nothing into the document but displays some candidate words based on the command), it works as well.
(3) If I input some characters (in this case the character picked automatically is pre-inserted into the documents, and a candidate list is shown and picking words in it replaces the pre-inserted one, or I can press space to accept the automatically picked character and the candidate list disappears), the pre-inserted character is automatically accepted and shown in the document. At the same time further keypress is not accepted anymore (including case 1 and 2).

To clarify the behavior in Iceweasel: the candidate list appears but the pre-inserted text does not. If I choose a candidate, the list disappears but nothing is inserted finally.

Here are tests with SCIM Pinyin:

In Iceweasel: similar to above behavior in IBus but if I disable SCIM after inputting some text then input some ASCII characters at the same location, the Chinese text I tried to input appears. If I go to another position (with arrow keys or mouse) and input ASCII chars, the Chinese text is lost permanently.

In Chromium: similar to above as well but there's no case 2 (SCIM does not have such feature). and after case 3, case 1 still works.

IBus includes another input method called GooglePinyin. With it the behavior has no change in Chromium but in Iceweasel it becomes SCIM Pinyin's one.

carivx wrote:

Fcitx under Archlinux works well with visual editor in Opera & Firefox.

hydrogen_cyanide wrote:

Feedbacks from Chinese Wikipedia: only one user using Ubuntu 11.10 can use Hime imput method. Others using Windows XP/7 cannot use [[en:MSPY]] on various browsers.

work:

  • Firefox @ Ubuntu 11.10 amd 64 + Hime

don't work:

  • Firefox @ Mac OS X 10.5 + IMKQIM (Chinese) / Kotoeri (Japanese)
  • Firefox / IE9 / Opera @ Windows 7 + MSPY
  • Chrome @ Windows XP + MSPY

We havn't supported IME yet, but we have 2 options here (the latter of which I think is the most reliable and scalable).

  1. Try to surface operating system IME into the user interface
  2. Integrate narayam, and add lots more languages

Currently narayam primarily supports langages where OS IME is missing or incomplete. We will be working with the i18n team to come up with some ways to import IME mappings from desktop environments like Gnome or KDE. IME is very important, and ideally our editor will have the best IME in the world, independent of your operating system.

Narayam is woefully inadequate for Chinese, Japanese, etc which require extensive dictionaries; even if it gets extended to act similarly to standard IMEs, it's rather disruptive to be replacing the standard system IME or interfering with it.

On mobile platforms where there's a system-wide on-screen keyboard and IME system this is even more true; attempting to replace the on-screen touch keyboards may be possible but would be pretty user-unfriendly.

windows XP + firefox + google pinyin can't input chinese.

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

hydrogen_cyanide wrote:

After the textarea changes to CE, input methods can be used.
But the change seems to be a test for other functions..

Confirmed still an issue with IME/etc. in current VE version.

Mass-moving items into VisualEditor product

Mass-move out of "General" to "ContentEditable".

hydrogen_cyanide wrote:

(In reply to comment #16)

Not a bug but a feature request.

If VE does not works with IME, it will be impossible to use VE in many projects, including ja, zh, ko and so on.

Y(In reply to comment #17)

(In reply to comment #16)

Not a bug but a feature request.

If VE does not works with IME, it will be impossible to use VE in many
projects, including ja, zh, ko and so on.

That it's a feature request doesn't mean we aren't going to do it (of course we are) but it means it's not "fixing existing broken code".

I recorded a screencast to make sure everyone understands what the problem is:
http://www.youtube.com/watch?v=k6h1A_6pzxA

In the Visual editor, I enter "日本語化" but only "にほ" gets written.

IME is not optional for Japanese/Chinese/Korean/etc users. Without IME, they just can not type any text.

If this bug can't be fixed,it means that the users with IME must write down on other editor and copy to VE from the editor.it 's too cumbersome to use VE.

Current version is pretty broken with Kotoeri (Japanese input method on Mac OS X) too, tested in both Firefox 16 nightly and Safari 5.1.7. Sometimes extra characters get input, or the input prediction box doesn't show up right, or various other failures.

I'm going to take the initiative to turn this back into a bug -- if IMEs don't work, the product is failing at basic text editing. From what I understand the switch back to ContentEditable was in part to make IMEs work more reliably, so we've got some problems that need resolving.

Here's a simpler test to confirm IMEs work in a ContentEditable view:

You should see "にほんご" inserted.

now for full IME work:

  • type "nihonngo"
  • hit space
  • You should be able to select through options, one of which is "日本語"
  • hit enter

You should see "日本語" inserted.

Nothing should look especially weird during this.

In Safari 5.1.7 and Firefox 16 nightly these both work on http://html5demos.com/contenteditable/

Just to make it crystal clear: We are going to support IME and there is already some code written for it.

IME works now in Chrome and Firefox. Still working on support in IE - should be done tomorrow.

Great to hear that!
I guess that means the source code is fixed, but not deployed to the test page yet? (tried now, bug was still present)
http://www.mediawiki.org/w/index.php?title=VisualEditor:Test&useskin=vector
After it is deployed there, if you could be kind enough to let us known... I am eager to test it :-)

Input 1 chinese word, show 2 chinese word(2 line), but paste chinese ok, save also ok.

IE support now done (and will be deployed today). Closing.

I confirm the bug is fixed for Japanese IME in Ubuntu with Firefox/Chrome/Opera.
Thanks a lot for the great effort!