Re: [webkit-dev] Handling IME composition events
On Thu, Jul 29, 2010 at 3:13 AM, Oliver Hunt oli...@apple.com wrote: On Jul 28, 2010, at 8:45 AM, Joone Hur wrote: 3) Keyboard events should not be dispatched during a composition. Key events must be sent while an IME is active otherwise sites break. IIRC you get keydown and keyup events, but not keypress. The keydown event when an IME is active has charCode 229 in order to be compatible with IE. In case of Firefox, it doesn't fire any keyboard events during a composition. Therefore, a Mozilla developer mentioned on a bug about no keyboard events during a Hangul composition as follows, I still think that we shouldn't fire any key events during composing. The compositionupdate event is enough for this issue. https://bugzilla.mozilla.org/show_bug.cgi?id=354358#c24 Firefox4.0b1 also doesn't fire any keyboard events after compositionstart event. = You can find a test result from http://bit.ly/99tkd0 Of course, there has been a compatibility issue of detecting composition states in case of Firefox compared to IE. However, I think that composition events seem enough without keyboard events during a IME composition. Because many Korean web developers have known this issue so they have used a workaround to avoid it. We need a consensus on this issue between WebKit and Mozilla developers. Thanks for your feedback. Joone ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Handling IME composition events
On Thu, Jul 29, 2010 at 9:18 AM, Joone Hur jo...@kldp.org wrote: On Thu, Jul 29, 2010 at 3:13 AM, Oliver Hunt oli...@apple.com wrote: On Jul 28, 2010, at 8:45 AM, Joone Hur wrote: 3) Keyboard events should not be dispatched during a composition. Key events must be sent while an IME is active otherwise sites break. IIRC you get keydown and keyup events, but not keypress. The keydown event when an IME is active has charCode 229 in order to be compatible with IE. However, I think that composition events seem enough without keyboard events during a IME composition. If were were designing these APIs from scratch, that might be the case. But WebKit only recently added composition events. We have been firing key events for a long time. If we stopped firing them, a lot of sites would break in WebKit browsers. So, not firing them is not an option. We need a consensus on this issue between WebKit and Mozilla developers. I don't think we could reasonably stop firing key events. Too many sites would break. Ojan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Handling IME composition events
Hello all, I’m working on a Hangul(Korean alphabet) composition issue in WebKit. https://bugs.webkit.org/show_bug.cgi?id=40518 By the way, I noticed that WebKit based browsers are inconsistent with IME composition events. According to the W3C DOM Level 3 events(http://bit.ly/bM7YVQ), 1) A browser should fire compositionstart, compositionupdate, and compositionend event during a composition. 2) The textEvent event should be dispatched after a compositionend event if the composition has not been canceled. 3) While a composition session is active, keyboard events should not be dispatched to the DOM (i.e., the text composition system swallows the keyboard events), and only compositionupdate events may be dispatched to indicate the composition process. However, all ports of WebKit handle composition events in inconsistent ways. Even keyboard events are still dispatched to the DOM during a composition. Therefore, it is necessary to fix those problems as follows: 1) IME Composition events should be handled consistently in all ports of WebKit. 2) The textInput event should be dispatched after a compositionend event. 3) Keyboard events should not be dispatched during a composition. The following link shows an example of testing composition events with the major WebKit based browsers. https://bug-43020-attachments.webkit.org/attachment.cgi?id=62647 I was wondering what is a good example of handling composition events. In my opinion, the composition events should be dispatched as follows if we follow the W3C DOM Level3 events. For example, when we type ‘rksk’ for inputting ‘가나' using Korean IME, Type ‘r(ㄱ)’ 1. compositionstart 2. input Type ‘k(ㅏ) 3. compositionupdate 4. input Type ‘s(ㄴ)’ 5. compositionupdate 6. input Type ‘k(ㅏ)’ 7. compositionend (for 가) 8. textInput 9. input 10. compositionstart 11. input mouse press 12. compositionend (for 나) 13. textInput 14. input Currently, Firefox, Chrome, and Safari don’t handle composition events like this because they seem not to follow the W3C specification on IME composition events yet. So I filed a bug for this issue. https://bugs.webkit.org/show_bug.cgi?id=43020 I would be grateful if you could give me your opinion on this issue. Thanks, Joone ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Handling IME composition events
On Jul 28, 2010, at 8:45 AM, Joone Hur wrote: Hello all, I’m working on a Hangul(Korean alphabet) composition issue in WebKit. https://bugs.webkit.org/show_bug.cgi?id=40518 By the way, I noticed that WebKit based browsers are inconsistent with IME composition events. According to the W3C DOM Level 3 events(http://bit.ly/bM7YVQ), 1) A browser should fire compositionstart, compositionupdate, and compositionend event during a composition. 2) The textEvent event should be dispatched after a compositionend event if the composition has not been canceled. 3) While a composition session is active, keyboard events should not be dispatched to the DOM (i.e., the text composition system swallows the keyboard events), and only compositionupdate events may be dispatched to indicate the composition process. The DOM Level 3 event model for input composition does not match the requirements of actual web content. This is unfortunate, but will hopefully be fixed in future. However, all ports of WebKit handle composition events in inconsistent ways. Even keyboard events are still dispatched to the DOM during a composition. Therefore, it is necessary to fix those problems as follows: 1) IME Composition events should be handled consistently in all ports of WebKit. I'm not sure this can be achieved as it depends (to an extent) on the platform IME system, and the active IME -- different IMEs have completely different behaviours making consistent behaviour across multiple platforms is an exercise in futility. However if you're seeing different behaviour with the same IME on a single platform that's a bug. 2) The textInput event should be dispatched after a compositionend event. Unsure of the specifics of this. 3) Keyboard events should not be dispatched during a composition. Key events must be sent while an IME is active otherwise sites break. IIRC you get keydown and keyup events, but not keypress. The keydown event when an IME is active has charCode 229 in order to be compatible with IE. --Oliver ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Handling IME composition events
On Wed, Jul 28, 2010 at 11:13 AM, Oliver Hunt oli...@apple.com wrote: On Jul 28, 2010, at 8:45 AM, Joone Hur wrote: 2) The textInput event should be dispatched after a compositionend event. Unsure of the specifics of this. There's a discussion on www-...@w3.org about changing the spec here. See http://lists.w3.org/Archives/Public/www-dom/2010AprJun/0048.html. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev