Closed Bug 1136590 Opened 9 years ago Closed 9 years ago

[Stingray] focus fallback algorithm

Categories

(Firefox OS Graveyard :: Gaia::TV::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: johnhu, Assigned: johnhu)

References

Details

Attachments

(1 file)

The fallback algorithm is:
Once a mozbrowserbeforekeydown captured, we should run the following:
1. check if the target element is invisible, body or html. If yes, run fallback.
2. list all visible system UIs (iframes and overlays)
3. sort all visible system UIs by z-index
4. focus system UI if we have system UI
5. focus appWindowManager.getActiveApp().getTopMostWindow()

The definition of element which is visible is that all of its ancestors should be visible.
Summary: [Meta][Stingray] focus fallback algorithm → [Stingray] focus fallback algorithm
Depends on: 1136591
Depends on: 1136601
No longer depends on: 1136601
Assignee: nobody → im
Comment on attachment 8571724 [details] [review]
[gaia] huchengtw-moz:bug-1136590-focus-fallback-algorithm > mozilla-b2g:master

Hi Rex and Sung,

Please review this patch. It contains a focus manager class who handles the focus lost issue and helps other modules to focus back to top most UI.
Attachment #8571724 - Flags: review?(suchiu)
Attachment #8571724 - Flags: review?(rexboy)
Attachment #8571724 - Flags: review?(lchang)
Comment on attachment 8571724 [details] [review]
[gaia] huchengtw-moz:bug-1136590-focus-fallback-algorithm > mozilla-b2g:master

r=me

per our discussion, please add some comment that we suppose an element should be 'hidden' if one of its parent is hidden.
Attachment #8571724 - Flags: review?(rexboy) → review+
Comment on attachment 8571724 [details] [review]
[gaia] huchengtw-moz:bug-1136590-focus-fallback-algorithm > mozilla-b2g:master

It's good to me!
Attachment #8571724 - Flags: review?(suchiu) → review+
Blocks: 1136591
Depends on: 1136618, 1136603
No longer depends on: 1136591
Comment on attachment 8571724 [details] [review]
[gaia] huchengtw-moz:bug-1136590-focus-fallback-algorithm > mozilla-b2g:master

Thanks guys. Since I got two r+, I removed the review flag of Luke Chang.
Attachment #8571724 - Flags: review?(lchang)
merged to master:
https://github.com/mozilla-b2g/gaia/commit/8d8d1821d6d096b33b4c814754a9f199b7b89cfd

gaia try is all green:
https://treeherder.mozilla.org/#/jobs?repo=gaia-try&revision=eb325138483e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: