Closed Bug 622939 Opened 13 years ago Closed 8 years ago

Clicking anywhere on tab modal prompt should focus it

Categories

(Toolkit :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: jk1700, Assigned: jaws)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20110101 Firefox/4.0b9pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20110101 Firefox/4.0b9pre

When tab modal prompt is not focused (for example user clicked on the url bar) user can focus it again by clicking the prompt text. However if other part of modal box is clicked (for example icon) box is not focused and when the box is not focused the "Esc" key doesn't work

Reproducible: Always

Steps to Reproduce:
1. type javascript:alert('test') in url bar and press enter
2. focus the url bar by clicking on it
3. click on the tab modal icon
4. press esc

Actual Results:  
Nothing happens

Expected Results:  
Prompt should close

I guess also clicking in the content area but outside the modal box should also focus modal box
Blocks: 59314
Version: unspecified → Trunk
Summary: Clickin anywhere on tab modal prompt should focus it → Clicking anywhere on tab modal prompt should focus it
Assignee: nobody → jaws
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8771036 [details]
Bug 622939 - Clicking anywhere on a tab-modal prompt should focus it.

https://reviewboard.mozilla.org/r/64286/#review61610

This stuff is well weird.

So, I'm not opposed to r+'ing this and having it land as-is, because it fixes the case where you click the area around the container (big black area). I don't understand *why* it fixes that, because you're only changing focusability of the thing in the dialog, not the container. But it does seem to help.

However, if I follow these STR:

1. load javascript:alert('whatever') in a tab with about:blank in it.
2. click in location bar
3. click whitespace in alert dialog
4. hit [esc]

Nothing happens for me. Both with and without the patch.

So I don't think this fixes the bug as filed completely. I tried adding -moz-user-focus: normal in some more places but it didn't help. Ideas? :-)
Attachment #8771036 - Flags: review?(gijskruitbosch+bugs)
FWIW, Neil Deakin might be a better reviewer / source of suggestions here.
That's odd, this patch fixed the bug for me. Clicking in the big black area doesn't focus the dialog but clicking in the blank area of the dialog does focus it and specifically gives focus to the OK button.

I am using Windows 10. What OS did you test with? I don't expect the host OS to make a difference here though.
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #4)
> That's odd, this patch fixed the bug for me. Clicking in the big black area
> doesn't focus the dialog but clicking in the blank area of the dialog does
> focus it and specifically gives focus to the OK button.
> 
> I am using Windows 10. What OS did you test with? I don't expect the host OS
> to make a difference here though.

I tested on OS X. Makes some sense that that makes a difference because focus on OS X is weeeeeird. File a followup bug for OS X?
Flags: needinfo?(gijskruitbosch+bugs)
Depends on: 1287281
Comment on attachment 8771036 [details]
Bug 622939 - Clicking anywhere on a tab-modal prompt should focus it.

I filed bug 1287281 to investigate OSX.
Attachment #8771036 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8771036 [details]
Bug 622939 - Clicking anywhere on a tab-modal prompt should focus it.

https://reviewboard.mozilla.org/r/64286/#review61774
Attachment #8771036 - Flags: review?(gijskruitbosch+bugs) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ee862a030f3
Clicking anywhere on a tab-modal prompt should focus it. r=Gijs
https://hg.mozilla.org/mozilla-central/rev/9ee862a030f3
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.