Closed
Bug 775403
Opened 14 years ago
Closed 14 years ago
Focus (?) not working for tabs in Gaia browser app (virtual keyboard broken for remote content in browser)
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: cjones, Assigned: Felipe)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
3.96 KB,
patch
|
cjones
:
review+
cjones
:
feedback+
|
Details | Diff | Splinter Review |
This is almost certainly due to bug 774139.
Testing on http://people.mozilla.com/~cjones/events-mouse.html, which doesn't preventDefault() the touchstart event so should only get mouse events IIUC, I see
received event touchstart
received event mousedown
received event touchmove <== wrong, I think
received event mousemove
received event touchmove
received event mousemove
...
received event touchend <== also wrong, I think, maybe not
received event mouseup
This is probably confusing either our focus code or the JS form helper.
| Reporter | ||
Updated•14 years ago
|
Blocks: b2g-e10s-work
| Assignee | ||
Comment 1•14 years ago
|
||
That sequence seems right to me. If you have listeners, you'll always get the touch events. And if the code called preventDefault() then it should stop getting mouse events, but will still get touch.
| Reporter | ||
Comment 2•14 years ago
|
||
OK. Good to know, my understanding was incorrect.
| Reporter | ||
Comment 3•14 years ago
|
||
Alright, doesn't seem to be touch-event related. Whew!
If I load this page
http://people.mozilla.com/~cjones/focus.html
as the "Template" app, set to run out-of-process, it brings up the VKB just fine. If I remove the .focus() call and tap the app, it works just fine too.
However, if I load the same page in the browser app, it *doesn't* work, whether with explicit .focus() or tapping the input box.
This smells to me like a missing docShell.activate on the content side. Dale, Justin, can you guys investigate?
No longer blocks: 774139
Component: DOM: Events → DOM: Other
Summary: Gaia virtual keyboard broken for remote content → Focus (?) not working for tabs in Gaia browser app (virtual keyboard broken for remote content in browser)
| Reporter | ||
Updated•14 years ago
|
Blocks: browser-api
| Reporter | ||
Comment 4•14 years ago
|
||
Another possibility is that this is a recent bug in the gaia browser app. If so please close out.
| Assignee | ||
Comment 5•14 years ago
|
||
| Assignee | ||
Comment 6•14 years ago
|
||
Here's what I think is happening:
You remember when you were dealing with bug 761927 and debugging through nsFocusManager::SetFocusInner et. al? The focus manager is activated by mouse or keyboard input events.
Now, in bug 774139, we stopped sending mouse events to the parent element, in favor of creating the phony mouse events in the content. But this means that SetFocusInner won't get called and remote->Activate() won't be called (http://mxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1781)
The solution is that we can still block cross-process forwarding of mouse events in that case, but we make them reach the parent frame as well. This seems a more correct behavior.
Another hack solution would be to call remote->Activate() in nsEventStateManager::HandleCrossProcessEvent, but that feels like a hack and I believe can fall into other focus issues.
| Reporter | ||
Comment 7•14 years ago
|
||
Comment on attachment 643728 [details] [diff] [review]
Experiment
Fixes the bug for me.
Attachment #643728 -
Flags: feedback+
| Reporter | ||
Comment 8•14 years ago
|
||
Indeed a regression from forwarding touch events.
Component: DOM: Other → DOM
| Reporter | ||
Comment 9•14 years ago
|
||
A potential problem with this patch is that IIUC, it will result in synthesized mouse events *always* being delivered to in-process content, even if the content preventDefault(). I don't think that's all that serious of a problem but we'd need to test.
| Assignee | ||
Updated•14 years ago
|
Attachment #643728 -
Flags: review?(bugs)
| Reporter | ||
Comment 10•14 years ago
|
||
Comment on attachment 643728 [details] [diff] [review]
Experiment
smaug is OK with delegating this review to me.
Attachment #643728 -
Flags: review?(bugs) → review+
| Reporter | ||
Comment 11•14 years ago
|
||
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → felipc
Target Milestone: --- → mozilla17
Comment 12•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•