Closed
Bug 683736
Opened 14 years ago
Closed 14 years ago
Backspace key in form fields in desktop Linux Fennec goes back a page instead of deleting
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 10
People
(Reporter: mbrubeck, Assigned: romaxa)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
4.21 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
Since bug 682017 landed, pressing backspace in an <input> field in web content in desktop Fennec does not delete characters. Instead, it navigates back a page.
Android is not affected by this bug (possibly because the backspace shortcut is disabled on Android, bug 635495).
Assignee | ||
Comment 1•14 years ago
|
||
Sounds like we should handle properly prevent default case in better way
Assignee | ||
Updated•14 years ago
|
Assignee: mbrubeck → romaxa
Reporter | ||
Comment 2•14 years ago
|
||
Based on some logging, pressing backspace sends keydown and keyup events in the content process, but no keypress event...
Reporter | ||
Comment 3•14 years ago
|
||
(In reply to Matt Brubeck (:mbrubeck) from comment #2)
> Based on some logging, pressing backspace sends keydown and keyup events in
> the content process, but no keypress event...
Nevermind, this is not true. It was an error in my debugging.
Comment 4•14 years ago
|
||
Afaict, this code should be called:
http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/base/nsEditor.cpp#5015
where on line 5021, the backspace key event is consumed.
Assignee | ||
Comment 5•14 years ago
|
||
First of all we should do rpc calls in SendRealKeyEvent... and return nsEventStatus back to UI.
Assignee | ||
Comment 6•14 years ago
|
||
Secodn problem I found that event with handling remote browser event status we still have mainKeySet handling event before remote browser.
ContentCustomKeySender.prototype: handleEvent:keypress - Fennec UI container get's event
nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent*, nsIAtom*)::326 prevent:0
nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent*, nsIAtom*)::326 prevent:0
CallRealKeyEvent::316 Before call child process status:0
nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent*, nsIAtom*)::326 prevent:1 XBLkeyhandler get's 3 keypress events before remote browser handle it.
AnswerRealKeyEvent::635 status:1
Content key press received: prevent:true
SendRealKeyEvent::317 status:1
Is it possible to make UI mainKeySet handle event after remote browser frame?
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #557384 -
Flags: review?(mbrubeck)
Assignee | ||
Comment 8•14 years ago
|
||
idea is very simple, allow content dispatch events as it is, but with disabled keyset, and when content bubble not used event back, enable keyset and handle that event
Reporter | ||
Comment 9•14 years ago
|
||
Comment on attachment 557384 [details] [diff] [review]
Disable keyset until respond from content received.
Kind of hacky, but at least it's less hacky than my old code that bug 682017 removed. :)
This patch disables the keyset for every keypress event that gets forwarded, but it re-enables it only when it gets a message from the content process. The content process does not send a message for events with getPreventDefault(), so there are cases where the keyset isn't re-enabled after the keypress.
We could fix this by sending a message for every keypress event, but redispatch the event in the parent process only if the message has preventDefault set to false.
Attachment #557384 -
Flags: review?(mbrubeck) → review-
Assignee | ||
Comment 10•14 years ago
|
||
Attachment #557384 -
Attachment is obsolete: true
Attachment #557597 -
Flags: review?(mbrubeck)
Reporter | ||
Comment 11•14 years ago
|
||
Comment on attachment 557597 [details] [diff] [review]
Disable keyset until respond from content received.
> case "Browser:KeyPress":
>+ var keyset = document.getElementById("mainKeyset");
Use "let" and add braces around the whole case block.
>+ if (json.preventDefault) {
>+ break;
>+ }
No braces.
r=mbrubeck. I can fix the nits and check this in.
Attachment #557597 -
Flags: review?(mbrubeck) → review+
Reporter | ||
Comment 12•14 years ago
|
||
Whiteboard: [inbound]
Comment 13•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 9
Comment 14•14 years ago
|
||
backed out. caused 684558.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 15•14 years ago
|
||
Try run is green: https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=cdb8f52e8801
Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/f24d24c42c2b
Status: REOPENED → ASSIGNED
Target Milestone: Firefox 9 → Firefox 10
Comment 16•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•