Closed
Bug 952080
Opened 11 years ago
Closed 11 years ago
Inputmethod.sendKey always returns success, also if the key got canceled
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 C2/1.4 S2(17jan)
People
(Reporter: janjongboom, Assigned: janjongboom)
References
Details
Attachments
(1 file, 1 obsolete file)
7.23 KB,
patch
|
janjongboom
:
review+
|
Details | Diff | Splinter Review |
sendKey always succeeds, even when the keydown got preventDefault'ed. We should implement this properly.
Assignee | ||
Comment 1•11 years ago
|
||
Simple patch. If keydown gets canceled there will be no key inserted so the promise should fail. We need this f.e. in keyboard where we do autocorrect on enter, but if the key event gets canceled that shouldn't happen.
Attachment #8350062 -
Flags: review?(xyuan)
Comment 2•11 years ago
|
||
Comment on attachment 8350062 [details] [diff] [review] 952080.diff Review of attachment 8350062 [details] [diff] [review]: ----------------------------------------------------------------- r=me. And we need a mochitest for this ;-) ::: dom/inputmethod/MozKeyboard.js @@ +544,5 @@ > case "Keyboard:SendKey:Result:OK": > resolver.resolve(); > break; > + case "Keyboard:SendKey:Result:Error": > + resolver.reject(); Reject with the reason why sendKey failed. ::: dom/inputmethod/forms.js @@ +529,1 @@ > requestId: json.requestId We need to return some meaningful error message to let keyboard know why it failed.
Attachment #8350062 -
Flags: review?(xyuan) → review+
Assignee | ||
Comment 3•11 years ago
|
||
:janjongboom goes on quest to write test.
Assignee | ||
Comment 4•11 years ago
|
||
Patch with rejection reason included, and a mochitest. Try: https://tbpl.mozilla.org/?tree=Try&rev=c95c83a7c234
Attachment #8350062 -
Attachment is obsolete: true
Attachment #8350578 -
Flags: review+
Assignee | ||
Comment 5•11 years ago
|
||
Hi Ryan, does that try look OK? I see some intermittents and a timeout.
Flags: needinfo?(ryanvm)
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/c0335f9a2498
Flags: in-testsuite+
Keywords: checkin-needed
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c0335f9a2498
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
You need to log in
before you can comment on or make changes to this bug.
Description
•