Closed Bug 859596 Opened 11 years ago Closed 11 years ago

Input focus didn't be taken away when the window is closed by parent.

Categories

(Firefox OS Graveyard :: General, defect, P2)

ARM
Gonk (Firefox OS)

Tracking

(blocking-b2g:leo+, b2g18 verified, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 verified)

VERIFIED FIXED
1.1 QE1 (5may)
blocking-b2g leo+
Tracking Status
b2g18 --- verified
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- verified

People

(Reporter: leo.bugzilla.gecko, Assigned: shelly)

References

Details

(Whiteboard: [TD-10296])

Attachments

(2 files, 1 obsolete file)

Step : 
  1) Go to BT settings and search for a BT mono headset (I use LG HBM-220)
  2) Try to pair with it, it should require PIN code: 0000
  3) If successfully paired and connected try to unpair and perform again 1-2 steps. Observe the UI behaviour (see attached video)

Detailed Symptom : 
  Sometimes on the screen remains PIN code numeric keyboard (see video) and there are problems with BT headset pairing procedure.

Expected :
  There shouldn't be any problems while pairing.

I'll Show attach a video file.
Please, check the issue.
Attached video keypad is showed always
From the video, at the time point 2:49, a pairing screen shows and then quickly covered by a connection fail(?) screen, that's why keypad sticks on the screen because the pairing screen wasn't closed correctly. 

Shawn, do we have this kind of device for test? or can you reproduce the issue on another headset?
Whiteboard: [TD-10296]
Component: Gaia::Bluetooth File Transfer → Gaia::Settings
This issue was identified as a Leo QE1 blocker. Nominating for leo?
blocking-b2g: --- → leo?
Target Milestone: --- → Leo QE1 (5may)
blocking-b2g: leo? → leo+
This issue was not related to Bluetooth. It is related to window management, I guess. I will let Evelyn comment on.
Summary: [Bluetooth] Strange UI behaviour when connecting with BT mono headset → Strange UI behaviour when connecting with BT mono headset
(In reply to Shawn Huang from comment #4)
> This issue was not related to Bluetooth. It is related to window management,
> I guess. I will let Evelyn comment on.

I investigated the problem before, and believe it's not related to Bluetooth module.
The problem is: if a window with input field focused is closed by its parent, the input focus didn't be released (i.e. keyboard app won't get a blur event).
We may need someone looking into frame script (form.js) to know why the focus change didn't happen.
Component: Gaia::Settings → General
Summary: Strange UI behaviour when connecting with BT mono headset → Input focus didn't be taken away when the window is closed by parent.
Priority: -- → P2
Assignee: nobody → slin
Attached patch Patch (obsolete) — Splinter Review
Hi Evelyn, could u review my patch, thanks!
Attachment #742241 - Flags: feedback?(ehung)
Attached file Patch
Attachment #742241 - Attachment is obsolete: true
Attachment #742241 - Flags: feedback?(ehung)
Attachment #742244 - Flags: feedback?(ehung)
Attachment #742244 - Attachment mime type: text/plain → text/html
Btw, if you stay idle on the paring screen with keyboard shown, wait until the device locks the screen itself. If unlock the screen again, will observe that the top half of paring screen draws over the unlock screen.

Sounds like another bug?
(In reply to Shelly Lin [:shelly] from comment #8)
> Btw, if you stay idle on the paring screen with keyboard shown, wait until
> the device locks the screen itself. If unlock the screen again, will observe
> that the top half of paring screen draws over the unlock screen.
> 
> Sounds like another bug?
Yes, sounds another bug not related to this issue. Could you file another bug with detailed STR? Thanks you. 

(In reply to Shelly Lin [:shelly] from comment #6)
> Created attachment 742241 [details] [diff] [review]
> Patch
> 
> Hi Evelyn, could u review my patch, thanks!
I'll try this on Monday, I need a entering-pin bluetooth device for test.
(In reply to Evelyn Hung [:evelyn] from comment #10)
> (In reply to Shelly Lin [:shelly] from comment #8)
> > Btw, if you stay idle on the paring screen with keyboard shown, wait until
> > the device locks the screen itself. If unlock the screen again, will observe
> > that the top half of paring screen draws over the unlock screen.
> > 
> > Sounds like another bug?
> Yes, sounds another bug not related to this issue. Could you file another
> bug with detailed STR? Thanks you. 
> 
> (In reply to Shelly Lin [:shelly] from comment #6)
> > Created attachment 742241 [details] [diff] [review]
> > Patch
> > 
> > Hi Evelyn, could u review my patch, thanks!
> I'll try this on Monday, I need a entering-pin bluetooth device for test.

Thanks Evelyn :), and bug 866566 is created.
Shelly, can you provide the current status on this bug?
Flags: needinfo?(slin)
Need review from Evelyn.
Flags: needinfo?(slin)
Comment on attachment 742244 [details]
Patch

r=me, Sorry for my very late review.
This patch works but I think it's a workaround, it didn't resolve the real problem. Input focus should be removed when its window object is destroyed, it's not application's responsibility, which it means application have to aware and take care of keyboard app's status.
I'm fine to merge this patch as a temporary solution, but please file a bug as a follow-up for the real problem. Thank you so much.
Attachment #742244 - Flags: feedback?(ehung) → review+
Hi Shelly, just saw your commit message:
"The forms.js did receive blur events when closing the child window, but somehow the Keyboard.jsm fail to receive any message."
So is it a keyboard API issue or process/thread communication issue? anyway, please help on filing a bug on it. Thank you.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Issue seems to be fixed. The numeric key board is not found while trying to pair a monoset bluetooth.

Inari Build ID: 20130506070205
Kernel Date: Feb 21
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/ce67220b877d
Gaia: 1e598d8842920d9e0b1743dc6fe9390bd5f6e2df

Leo Build ID: 20130506105248
Kernel Date: April 25th
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/00c554abfc17
Gaia: 94f03a82bc66ad04352d127747ca226368d96363
Status: RESOLVED → VERIFIED
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap?(dwatson)
Created two test cases checking that the UI gets dismissed when pairing and canceling.

https://moztrap.mozilla.org/manage/cases/?filter-id=9442
https://moztrap.mozilla.org/manage/cases/?filter-id=9441
Flags: in-moztrap?(dwatson) → in-moztrap+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: