Open Bug 1338460 Opened 8 years ago Updated 2 years ago

[Cocoa] TextInputHandler and IMEInputHandler should only store native events during NSKeyDown and dispatch events at the end of NSKeyDown handler

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

All
macOS
enhancement

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

Details

(Keywords: inputmethod, Whiteboard: tpi:+)

In cocoa, NSKeyDown is handled with following steps:

1. TextInputHandler::HandleKeyDownEvent() is called.
2. TextInputHandler::HandleKeyDownEvent() dispatches eKeyDown event.
3. TextInputHandler::HandleKeyDownEvent() calls interpretKeyEvents if eKeyDown isn't consumed and editable content has focus.
  -> Handled by keyboard layout or IME
4. TextInputHandler::InsertText(), IMEInputHandler::SetMarkedText() and/or TextInputHandler::DoCommandBySelector() are/is called (may be called multiple times).
5. Back to TextInputHandler::HandleKeyDownEvent() and dispatch eKeyPress event if no events are fired at #4.

FYI: Chromium perhaps do similar thing because they don't dispatch events smarter than us when odd IME is used. So, this is also a web-compat issue.
Priority: -- → P3
Whiteboard: tpi:+

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

Component: Widget: Cocoa → DOM: UI Events & Focus Handling
Type: defect → enhancement
Summary: TextInputHandler and IMEInputHandler should only store native events during NSKeyDown and dispatch events at the end of NSKeyDown handler → [Cocoa] TextInputHandler and IMEInputHandler should only store native events during NSKeyDown and dispatch events at the end of NSKeyDown handler
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.