Hardware and soft keyboard stop working after displaying a dialog in a new window

VERIFIED FIXED

Status

Fennec Graveyard
General
P1
normal
VERIFIED FIXED
8 years ago
6 years ago

People

(Reporter: Ioana Chiorean, Assigned: mwu)

Tracking

Trunk
ARM
Android
Bug Flags:
in-testsuite ?
in-litmus ?

Details

(Whiteboard: [VKB])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100826 Minefield/4.0b5pre
Build Identifier: Mozilla /5.0 (Android;Linux armv7l; rv:2.0b5pre)Gecko/20100826 Namoroka/4.0b5pre Fennec /2.0b1pre

trying top save the banner from http://slickdeals.net/ will open the system save image dialog which till now is not working right. Still the cancel button exists the system save image dialog, so this is should exit normally and when you press the URL bar you should be able to use the SW keyboard. 

Reproducible: Always

Steps to Reproduce:
1. Go to http://slickdeals.net/
2. Tap and hold down on the Slickdeals banner image link on the top left side of the page
3. Select "Save Image"
4. On the system save image dialog, press cancel button 
5. Tap the URL bar
Actual Results:  
the SW keyboard doesn't pop up, is not available

Expected Results:  
the SW keyboard pops up, is available is available to use it

Updated

8 years ago
OS: Other → Android
Hardware: Other → ARM
Bug 590779 added code so that it requires 2 taps on the URLbar for the soft keyboard to appear. Does that work for you?
(Reporter)

Comment 2

8 years ago
no, unfortunately even if i tap more than once, the SW keyboard doesn't appear
I'm seeing that too with other images.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'm thinking of a problem with the current focused element when coming back from the "Save as" dialog because hardware buttons seems to have no effect on the Fennec UI anymore after these steps to reproduce. (Except the Home button obviously)
Created attachment 470432 [details] [diff] [review]
Patch (m-c)

The activate state of the window should be turned on when the window is show again.

So the patch makes it works but I think the "Save as" window really need some love because with this current UI you can't create a New Dir, trying to access the Home folder give you a "You don't have the permission..."
Comment on attachment 470432 [details] [diff] [review]
Patch (m-c)

2 lines patch to let the window goes back to an active state after have dismissed the "Save As" window
Attachment #470432 - Flags: review?(mwu)
tracking-fennec: --- → ?
Flags: in-testsuite?
Flags: in-litmus?
(Assignee)

Comment 7

8 years ago
Comment on attachment 470432 [details] [diff] [review]
Patch (m-c)

Sorry for taking so long to review - didn't realize this was in my queue!

Can you try putting something like if (!gTopLevelWindows.IsEmpty()) FindTopLevel()->BringToFront(); in the nsWindow destructor and see if that works?
(In reply to comment #7)
> Comment on attachment 470432 [details] [diff] [review]
> Patch (m-c)
> 
> Sorry for taking so long to review - didn't realize this was in my queue!
> 
> Can you try putting something like if (!gTopLevelWindows.IsEmpty())
> FindTopLevel()->BringToFront(); in the nsWindow destructor and see if that
> works?

No worries, it was not urgent.
I'll try that in the next few days, thanks for the advice.
(Assignee)

Updated

7 years ago
Attachment #470432 - Flags: review?(mwu)
Summary: SW keyboard doesn't pop up after canceling a save image as → [VKB]SW keyboard doesn't pop up after canceling a save image as
We are removing "Save As" dialogs from the application, but as a core widget issue, this bug seems like something that should be fixed. I'm not sure how you will be able to trigger the bug. You might need to add a Save As dialog back into the app.
tracking-fennec: ? → 2.0-
This bug was out of my sight for a while since we've removed the "Save As" dialog but hopefully I can reproduce it by clicking on the Site Menu -> Share Page.
If you dismiss this native dialog and try to click on the urlbar the VKB won't come.

(In reply to comment #7)
> Can you try putting something like if (!gTopLevelWindows.IsEmpty())
> FindTopLevel()->BringToFront(); in the nsWindow destructor and see if that
> works?

It does not work, I assume this is because the application/window we are coming from is a native one and does not fire this code.

I've retry my patch and it works for this case
Summary: [VKB]SW keyboard doesn't pop up after canceling a save image as → SW keyboard doesn't pop up after canceling a save image as
Whiteboard: [VKB]
I couldn't reproduce this bug using the sharing dialog, but this patch does fix the keyboard after the non-mobile SSL dialog appears (bug 566478).  Re-nominating because we have seen this bug appear it at least two more cases besides the original one that was removed.

This bug doesn't just affect the software keyboard.  Hardware keyboards and the hardware buttons like "Back" and "Menu" also stop working when a dialog appears.  Re-summarizing to be more general.
Assignee: nobody → 21
Status: NEW → ASSIGNED
tracking-fennec: 2.0- → ?
Summary: SW keyboard doesn't pop up after canceling a save image as → Hardware and soft keyboard stop working after displaying a dialog in a new window
Steps to reproduce:
 * Go to the console in the right panel
 * typed in the js eval textbox: var w = window.open("browser.xul"); w.close();
 * validate the input
 * try to click into an input field

Actual result:
 * No VKB

Expected result:
 * a VKB
Comment on attachment 470432 [details] [diff] [review]
Patch (m-c)

hmm, actually I'm not sure the patch fix the STR...
Attachment #470432 - Flags: review?(mwu)
This bug also affects the LastPass Mobile add-on.
tracking-fennec: ? → 2.0+
can we get this landed for beta 3 if there's a patch?   if so, please approve for b3 blocker

Comment 17

7 years ago
Crowder, can you take a look at this?
Assignee: 21 → crowderbt
(Assignee)

Comment 18

7 years ago
Created attachment 503371 [details] [diff] [review]
Use per top-level window focus tracking

This switches to tracking the focused window per top level window instead of a single pointer to track the focused window. This is done because we need to know which window within a top level window hierarchy to send events to when switching windows, which can't be done with a single pointer. It also brings the next window up if the current top window is hidden.
Assignee: crowderbt → mwu
Attachment #470432 - Attachment is obsolete: true
Attachment #503371 - Flags: review?(doug.turner)
Comment on attachment 503371 [details] [diff] [review]
Use per top-level window focus tracking

sorry for the delay.  this patch has bitrotted quite a bit.  would you mind posting a new version.
(Assignee)

Comment 20

7 years ago
Created attachment 510397 [details] [diff] [review]
Use per top-level window focus tracking, v2

Unbitrotted
Attachment #503371 - Attachment is obsolete: true
Attachment #510397 - Flags: review?(doug.turner)
Attachment #503371 - Flags: review?(doug.turner)
Blocks: 633036
Comment on attachment 510397 [details] [diff] [review]
Use per top-level window focus tracking, v2

been running for a while without any noticeable issues.
Attachment #510397 - Flags: review?(doug.turner) → review+
http://hg.mozilla.org/mozilla-central/rev/0a7448775fa0
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Duplicate of this bug: 633036
(Reporter)

Comment 24

7 years ago
It seems I can't get anymore the old certification error nor the File picker is present.. Please let me know if there is a way to generate them to verify the bug or should we set this Verified as the error is not present anymore?
(Assignee)

Comment 25

7 years ago
(In reply to comment #24)
> It seems I can't get anymore the old certification error nor the File picker is
> present.. Please let me know if there is a way to generate them to verify the
> bug or should we set this Verified as the error is not present anymore?

Anyone at the mv office can verify this bug. Simply connect to mozillaguest and start fennec. A cert error should appear. If not, go to the pref panel and go to the addons section.
(Reporter)

Comment 26

7 years ago
can you please state me a person to talk to ?
Save Image feature looks different now on the latest Nightly build and it's working as expected. I will mark this bug as verified fixed.

--
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110919
Firefox/9.0a1 Fennec/9.0a1
Device: Samsung Galaxy S
OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.