Closed
Bug 1161940
Opened 9 years ago
Closed 9 years ago
[Stingray] Lost focus after pinning TV channel occasionally
Categories
(Firefox OS Graveyard :: Gaia::TV, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dwi2, Assigned: johnhu)
Details
Attachments
(2 files, 2 obsolete files)
STR: 1. After boot-up, enter TV app 2. pin channel with lower-left pin button Expected result: Back to smart-home app and the focus is on the latest pinned TV channel Actual result: There are around 1/3 chances that the focus is still on TV app.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → im
Assignee | ||
Comment 1•9 years ago
|
||
I found a STR which almost gives us 100% reproduce ratio: 1. open tv deck 2. pin 3. press up/down while animation running
Assignee | ||
Comment 2•9 years ago
|
||
I had put log at browser_mixin.js before blur and focus. The log shows it focuses to smart-home correct and no following logs. This means gaia doesn't call tv deck's focus(). But document.activeElement gives us tv deck at this time.
Assignee | ||
Comment 3•9 years ago
|
||
I had tried another test case. I set an interval with 100ms. It showed that the focus had set to smart-home and after few ms, it goes back to tv deck.
Assignee | ||
Comment 4•9 years ago
|
||
Sean, This is the one I told you. Please help us to check it from gecko's point of view.
Flags: needinfo?(selin)
Assignee | ||
Comment 5•9 years ago
|
||
It's so strange. If I remove the focus function call in TV deck, this issue is disappeared. It seems the local focus in TV deck may affect the local focus in system app.
Assignee | ||
Comment 6•9 years ago
|
||
We only need to remove this line to workaround it.
Attachment #8602008 -
Attachment is obsolete: true
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8602015 [details] [diff] [review] more specific test patch False alarm. This issue is so hard to reproduce. Once I applied this patch, the issue is still there. Another STR to reproduce it is: 1. open TV deck 2. press enter continuously.
Attachment #8602015 -
Attachment is obsolete: true
Assignee | ||
Comment 8•9 years ago
|
||
We could reproduce the same issue with this patch. This is confirmed with Sung.
Assignee | ||
Comment 9•9 years ago
|
||
STR of comment 8: 1. open app deck 2. press enter continuously Once affected, you may find the focus moved to left top corner of app deck.
Assignee | ||
Comment 10•9 years ago
|
||
Deassign myself until Sean Lin gives us more information.
Assignee: im → nobody
Assignee | ||
Comment 11•9 years ago
|
||
Take this back since we had offline discussion about this.
Assignee: nobody → im
Comment 12•9 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8602496 [details] [review] [gaia] huchengtw-moz:bug-1161940-move-focus-to-known-element-while-animating > mozilla-b2g:master Rex, I had changed the code to move focus to an element instead of body to prevent other apps request focus from smart-home app. Please review this patch. Thanks.
Attachment #8602496 -
Flags: review?(rexboy)
Comment 14•9 years ago
|
||
The root cause is as follows (based on the STR in comment 9): 1. When the focus is set to smart-home, it only focuses the frame without explicitly setting focus to any element inside it. (The focused window is smart-home but focused content is null in this case.) 2. So a follow-up attempt to set focus to a smart button in app-deck could "steal" the focus. (The focused window becomes app-deck and the focused content becomes the smart button.) On the other hand, John's patch forces the focus on an element inside smart-home in step 1. Since the current focused content is non-null, the attempt in step 2 would trigger the security constraint [1] to prevent the focus move, since smart-home and app-deck cannot access each other's content due to same-origin policy. [1] https://dxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#1280-1298
Flags: needinfo?(selin)
Comment 15•9 years ago
|
||
Comment on attachment 8602496 [details] [review] [gaia] huchengtw-moz:bug-1161940-move-focus-to-known-element-while-animating > mozilla-b2g:master Basically it's OK but I'm not sure if it's the case on opening delete dialog. See my comments. Please discuss with me before landing.
Comment 16•9 years ago
|
||
Comment on attachment 8602496 [details] [review] [gaia] huchengtw-moz:bug-1161940-move-focus-to-known-element-while-animating > mozilla-b2g:master r=me but please move the function to a new util.js. Thank you!
Attachment #8602496 -
Flags: review?(rexboy) → review+
Assignee | ||
Updated•9 years ago
|
Whiteboard: checkin-needed
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Whiteboard: checkin-needed
Updated•9 years ago
|
Keywords: checkin-needed
Comment 17•9 years ago
|
||
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/a1813c4535ad7177a797e29bf73bf6d0b9d97267
Updated•9 years ago
|
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.
Description
•