Closed
Bug 1115455
Opened 9 years ago
Closed 9 years ago
[Stingray][System] focus app window while the app window is fully loaded
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.2 S3 (9jan)
People
(Reporter: johnhu, Assigned: johnhu)
References
Details
Attachments
(1 file)
According to the finding of bug 1113592, smart system app tries to focus an app window while the iframe is not loaded. This behavior doesn't set the focus to iframe correctly. We set focus when the app window is opened, currently. The `opened` state means that: 1. the iframe is created 2. the DOM elements and iframe is resized to correct size 3. the animation is end. I will make a patch to set focus only when 1. the iframe is loaded, 2. app window is opened and 3. app window is the active one.
Assignee | ||
Comment 1•9 years ago
|
||
Rex, Please review this patch. Sean, Please apply this patch and validate if we focus the app only when it is loaded at your environment.
Attachment #8541383 -
Flags: review?(rexboy)
Attachment #8541383 -
Flags: feedback?(selin)
Comment 2•9 years ago
|
||
Comment on attachment 8541383 [details] [review] focus app window when it is active and loaded It works at my environment (B2G desktop build on Ubuntu).
Attachment #8541383 -
Flags: feedback?(selin) → feedback+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → im
Comment 3•9 years ago
|
||
Some technical details about this issue FYI: 1. |nsFocusManager| checks if the content is focusable before actually setting focus on it. [1] 2. "Frames are never directly focused; instead focusing a frame means focus what is inside the frame. To do this, the descendant content within the frame is retrieved and that will be focused instead." [2] 3. There appears a sub-document and app-deck frame is visible, so the content node is used to determine focusability. [3] 4. While |nsFocusManager| determines focusability of the content node, the correspondent document hasn't been focusable since its docshell is still busy loading the page. (So it has one zombie content viewer and the new content structure hasn't been ready yet.) [1] http://dxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1164 [2] http://dxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1168-1171 [3] http://dxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1562-1572 [4] http://dxr.mozilla.org/mozilla-central/source/dom/base/nsContentUtils.cpp#6175-6192
Assignee: im → nobody
Updated•9 years ago
|
Assignee: nobody → im
Comment 4•9 years ago
|
||
Looks reasonable to me but I don't have the environment to reproduce the problem. I didn't found any problem while testing so r+ for Sean has already tested it.
Updated•9 years ago
|
Attachment #8541383 -
Flags: review?(rexboy) → review+
Assignee | ||
Comment 5•9 years ago
|
||
merged to master: https://github.com/mozilla-b2g/gaia/commit/fa225ad6ee36a8d9f3f3d26340ef85c70c845b58 gaia try is all green: https://treeherder.mozilla.org/ui/#/jobs?repo=gaia-try&revision=ccd204678fe1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Target Milestone: --- → 2.2 S3 (9jan)
You need to log in
before you can comment on or make changes to this bug.
Description
•