Opened 15 years ago

Closed 15 years ago

#3156 closed defect (invalid)

onkeypress not firing for Asian chars

Reported by: haysmark Owned by: anonymous
Priority: high Milestone: 0.9beta
Component: Internationalization Version: 0.9
Keywords: Cc: [email protected]
Blocked By: Blocking:


When you use an IME to type Asian characters, onkeypress should be fired, but isn't.

In Firefox, I get a compositionend (all lower case) event. Right now I have to create a fake onkeypress event in compositionend to get AutoCompleter? to behave. So in Firefox, dojo should turn a compositionend event into an onkeypress event.

In IE, I don't get anything. Find out what event is being thrown instead of compositionend and turn it into onkeypress.

AutoCompleter? and Select need these events to turn into onkeypress so that the auto-completing search will work.

Change History (2)

comment:1 Changed 15 years ago by sjmiles

Owner: changed from sjmiles to anonymous

I don't know anything about IME or compositionend events.

I'm happy to be a resource with respect to the keyboard code I comitted, but somebody else will have to code this feature.

comment:2 Changed 15 years ago by bill

Resolution: invalid
Status: newclosed

We went through talking about this a year or two ago. Characters input by an IME trigger the compositionEnd event. The reason it doesn't make sense to use the onkeypress event (besides that browsers don't work that way) is that IME's let you input a series of characters (typically two characters), so the onkeypress event has no way of representing that two characters were input. Onkeypress is for a single character only.

For example, if I type nihon into the IME it will input the two characters that mean japan (the day character and the book character), causing a single compositionEnd event.

Note: See TracTickets for help on using tickets.