When we using an IME (http://en.wikipedia.org/wiki/Input_method_editor) and type in autocomplete, it does not pop-up hint list (autocomplete list, no query).

** patch work for both Drupal 6, 7

Comments

yesct’s picture

Issue tags: +Novice

In preparation for the new "major" issue priority, I'm tagging this (not actually critical, but still important) issue as priority-major.
See: http://drupal.org/node/669048#comment-3019824 (#669048: We should have four priorities not three (introduce a new 'major' priority)) for more information about the coming major issue priority.

catch’s picture

Priority: Critical » Normal

This is just a normal bug, not critical.

I wasn't able to reproduce this bug with uim/anthy/hiragana when trying to test the patch - could you post steps to reproduce?

droplet’s picture

1. install Japanese IME (Microsoft IME), Chinese New ChangJie (any NEW xxx)
2. typing...

Screen Capture:
http://www.youtube.com/watch?v=-zv-UBc1Puw

catch’s picture

Er, no. You have to have tags in the db matching the ime input, which I'd stupidly missed, but no need to get sarky. Managed to reproduce with both kanji and romaji input, however applying the patch didn't fix it for me on ubuntu with chrome + uim/anthy.

droplet’s picture

damn.
ubuntu with Chrome + uim only trigger keydown

http://jsbin.com/uyequ3

casey’s picture

Component: base system » javascript

Is that text event triggered by the ime? It is not part of any standard, or is it?

marcingy’s picture

Priority: Normal » Major

Changing to major as per tag.

mustanggb’s picture

Tag update

yaoweizhen’s picture

StatusFileSize
new22.48 KB

It works with drupal-6.

droplet’s picture

@casey, @yaoweizhen

not sure how the IME works.
Seems diff OS platform and IME have inconsistent behavior.

setInterval maybe the only way to solve this problem but not the best way.
above patch working for most Windows OS that cover 80%~95% IME users.

Can we apply the patch first and seek a best way later ??

casey’s picture

Doesn't keydown, keyup or keypress give consistent results? text event is not part of any standard to my knowledge, so I rather don't use it. If we do, we need at least a reference link where it is documented.

sun.core’s picture

Category: task » feature
Priority: Major » Normal
Issue tags: -Quick fix, -Novice

This is a normal feature request.

+++ misc/autocomplete.js	28 May 2010 21:26:22 -0000
@@ -41,6 +41,7 @@
     .keyup(function (event) { ac.onkeyup(this, event); })
+    .bind('text', function (event) { ac.onkeyup(this, event); })

Should use

.bind('keyup.autocomplete change.autocomplete', ac.onkeyup)

...at least. Probably needs a event stack protection in ac.onkeyup() then though.

Powered by Dreditor.

catch’s picture

Title: handle IME input in autocomplete better » Handle IME input in autocomplete better
Category: feature » bug

#1070208: taxonomy autocomplete doesn't support Chinese input was duplicate.

This is at least a bug, you can't type Japanese without an IME, which means you can't use autocomplete without one (maybe you could copy and paste from a text editor, but that's not really 'autocomplete').

droplet’s picture

Version: 7.x-dev » 8.x-dev
Assigned: Unassigned » droplet
Status: Needs review » Needs work
Issue tags: +Needs backport to D7

Until now I don't see any perfect way to fix all OS users. but it's patch could cover most IME users. bump up version. Will be back with a new patch this week.

nod_’s picture

Any news on the patch?

Also can you test the jquery ui autocomplete and see if it works better?

droplet’s picture

Status: Needs work » Needs review
StatusFileSize
new524 bytes

"jquery ui autocomplete": Nope.

use HTML5 oninput event, it may not work in old firefox.

nod_’s picture

Aw :/ we'll have to fill a bug to jquery ui too then.

droplet’s picture

Never know CORE is using UI 1.9-PRE. Just tested #675446: Use jQuery UI Autocomplete and found it works well.

Looking into soruce, 1.9 catches INPUT events too.

			input: function( event ) {
				if ( suppressInput ) {
					suppressInput = false;
					event.preventDefault();
					return;
				}
				this._searchTimeout( event );
			},

We may need somebody test it on Linux

jimyhuang’s picture

#17 patch fix firefox search problem. Now have popup result when typing after patched.

But still have problem when ie and firefox user press "enter" to bring ime text to textfield, but popup will trigged when this "enter" also trigger js keycode "13" event. I suppose write some exception for ie / firefox to prevent hidePopup() triggered in keyup event.

jimyhuang’s picture

StatusFileSize
new1.19 KB

Update: For user who have problem on firefox / ie enter triggered described at #20 , attachment may solve your problem.

Status: Needs review » Needs work
Issue tags: -IME, -CJK, -Needs backport to D7

The last submitted patch, 812354-6738842.patch, failed testing.

droplet’s picture

Assigned: droplet » Unassigned
Issue summary: View changes
nod_’s picture

Status: Needs work » Closed (fixed)

Should be fixed by the move to jquery ui. If not feel free to reopen.

droplet’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Closed (fixed) » Needs work

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.