[Keyboard] Enter should just enter and not preventDefault if an autocorrect can be made

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: janjongboom, Assigned: janjongboom)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Lets say you have a textarea that on keycode 13 submits.

Now you type something the dictionary doesnt know and wants to autocorrect, and you type ENTER.

The word gets replaced, the form is not submitted, and a newline is inserted in the textarea.

First, we should respect the event and let it fire. Then if the keydown/keyup did not get canceled, we can do a replacement.
(Assignee)

Updated

5 years ago
Assignee: nobody → janjongboom
Created attachment 8349942 [details]
Test case

1. Set locale to English
2. Type a word that we know 'Jan', press enter. Event gets canceled.
3. Type a mistaken word 'Tes', press enter. Gets replaced by 'Yes' and inserts a newline.
4. Additional: pressing backspace keeps you on the newline but fixes the word...

I think this is actually in gaia.
(Assignee)

Updated

5 years ago
Whiteboard: [mentor=janjongboom]
Ok, clearing the mentor flag, as this has both gecko & gaia implications, so not a good starter bug :p
Whiteboard: [mentor=janjongboom]
(Assignee)

Updated

5 years ago
Blocks: 952078
(Assignee)

Updated

5 years ago
Depends on: 952080
(Assignee)

Updated

5 years ago
No longer blocks: 952078
Depends on: 952078
(Assignee)

Updated

5 years ago
Depends on: 952086
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.