Closed Bug 1104650 Opened 10 years ago Closed 10 years ago

[Stingray] When exit from activity, smart-system app will set focus on its own body element instead of iframe of current active app

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dwi2, Assigned: johnhu)

Details

Attachments

(1 file)

Currently, we enter smart-settings by mozActivity. When exit from activity, smart-system will set focus on its own body element instead of smart-home iframe. But it is not the case when user exit app which was launched by app.launch().

STR:
1. Enter smart-settings app
2. Press 'Home' key to exit
3. Press arrow keys to navigate

Expected:
able to navigate around (selection border could be moving around) 

Actual:
selection border stucks on icon of smart-settings
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Put this bug in my bug list. This is high priority to me. Thanks to let me know it.
Assignee: nobody → im
Hi Alive and Rex,

Please review this patch.

This issue is caused by that the close of inline activity doesn't make a focus transfer. Since all inline activities are using ActivityWindow and window activities are using AppWindow, the window activities transfer its focus within AppWindowManager's switchApp and their AppTransitionController. But the inline activities doesn't trigger that. So, I change the code to let ActivityWindowManager to handle activity focus transfer in activityterminated event.

The way we test it is: open WebIDE and use document.activeElement to check which element has focus.

One of the STR can be:
1. open gallery app
2. share an image to sms (sms inline activity is shown)
3. add another video to sms and choose video (video inline activity is shown)
4. press "<" button to back to sms activity (video inline activity is killed)
  ==> check document.activeElement, the value is system app's body. This is wrong.
5. press "X" button to back to gallery app (sms inline activity is killed)
  ==> check document.activeElement, the value is system app's body. This is wrong.

This issue may cause TV unable to use remote control. In phone, we may not have any impact if we have focus in system app but I would like to see this one to be fixed in phone version.

Thanks.
Attachment #8529000 - Flags: review?(rexboy)
Attachment #8529000 - Flags: review?(alive)
Comment on attachment 8529000 [details] [review]
set focus when an inline activity is killed

See my comment
Attachment #8529000 - Flags: review?(alive)
Comment on attachment 8529000 [details] [review]
set focus when an inline activity is killed

Seems Alive has already did a good review so cancel myself.
Attachment #8529000 - Flags: review?(rexboy)
Comment on attachment 8529000 [details] [review]
set focus when an inline activity is killed

Hey Alive,

I had changed my PR to address your comment. Thanks for the pointing. Please review it again.
Attachment #8529000 - Flags: review?(alive)
Comment on attachment 8529000 [details] [review]
set focus when an inline activity is killed

r+ with nits
Attachment #8529000 - Flags: review?(alive) → review+
merged to master:
https://github.com/mozilla-b2g/gaia/commit/26d733b6994957b5656f850a5a47b932565c0060

gaia-try is all green:
https://treeherder.mozilla.org/ui/#/jobs?repo=gaia-try&revision=e1d883b12c4f
Status: NEW → RESOLVED
Closed: 10 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: