Closed Bug 1529466 Opened 6 years ago Closed 6 years ago

Keydown - Tab event doesn't fire from input in Hangul compositing mode

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: tristan.fraipont, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(2 files)

Attached file input.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

This is very related to bug 1317906

Basically the same procedure than there, i.e typing some keystrokes while in composing mode with Hangul 2-Set IME, but inside an HTML form element such as an input or a textarea.

Actual results:

The typing default action is correctly dispatched, but no keydown event fires.

Expected results:

Keydown event should have fired on the input.

This is particularly problematic for my product because I am trying to generate some auto-complete form which relies on the ability to listen for "Tab" key. The keydown event never fires but the form is blurred anyway => I am unable to prevent the default behavior of Tab key down.
Moreover, I can't think of any workaround, since as far as I know, no other event allows to prevent the default behavior of this particular key.

Sorry I now realize that my description was a bit incorrect, the event does fire, but the key property is not the correct one (uses the last one).

Masayuki may have opinions.

Component: Layout: Form Controls → DOM: Events
Flags: needinfo?(masayuki)
See Also: → 1317906

Hmm. Looks like that this is a variation of bug 1529467. However, this must be not a new regression different from the bug.

Assignee: nobody → masayuki
Status: UNCONFIRMED → ASSIGNED
Component: DOM: Events → Widget: Cocoa
Depends on: 1529467
Ever confirmed: true
Flags: needinfo?(masayuki)
Keywords: inputmethod
OS: Unspecified → macOS
Hardware: Unspecified → All
Version: 66 Branch → Trunk

Ah, no. Most part of this bug will be fixed by bug 1529467. However, we don't treat insertTab: nor insertBacktab: command directly. Therefore, if user uses unusual mapping, it won't cause dispatching Tab key even after fixing the bug.

So, I'll fix only the minor case in this bug.

TextInputHandler::HandleCommand() dispatches Tab key events only when
it receives insertTab: or intertBacktab: command which are caused by
actual Tab key press.

However, these commands could be generated by IME or the system shortcut
keys are customized oddly.

This patch makes the method support such situation with dispatching fake
keydown and keypress events to emulate Tab key press for
mainly focus navigation.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/f89b6fea5847 Make `TextInputHandler::HandleCommand()` dispatch `keydown`/`keypress` events for emulating `Tab` key when `insertTab:` or `intertBacktab:` command is received r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Different from bug 1529467, I think that we don't need to take the patch for this bug since we've not dispatched keypress event for Tab in this case. So, this adds new feature and this fix won't help so many people. In other words, I believe that the fix for bug 1529467 helps most Korean users.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: