Closed Bug 1192655 Opened 9 years ago Closed 9 years ago

Disable Alt or F10 hotkeys (shortcuts) in fullscreen and DOM fullscreen

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: arni2033, Assigned: xidorn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

STR:   (Win7, 42.0a1 (2015-08-09))
1.   Open any video. E.g. this one: https://www.youtube.com/watch?v=xjbi5WWt5ak
2.A) Click fullscreen button in video controls to enter DOM fullscreen mode
2.B) Press F11 to enter fullscreen mode
3.   Press and release F10 (or Alt), then "Down" button
4.   Press F11 several times

Result:
No visible changes in steps 3 and 4.

Expectations:
Browser should switch to normal mode after the first time I press F11 in Step 4

Note:
If in step 4 I press Esc before pressing F11, then browser switches to normal mode eventually.
That happens because F10 (as well as Alt) opens Menu bar "in the background", and "Down" button opens "File" menu
So Currently user is able to do some actions without even knowing about it.

Also, part of this refers to Bug 1121280 - Fix full-screen UX issues for Flash and HTML5 video
I could Replicate this issue on Latest Nightly and Latest Release Version!

After going to watch any video in Yotube, If i press F10(Which happens to open or Hide Menu), then the F11 Key Doesn't work, unless I press the F10 key again or click on some buttons like play or pause.

Thanks Arni for finding this issue! I would like to wait for sometime and get some more feedback on this :)
QA Whiteboard: [bugday-20150811]
Attached patch patch (obsolete) — Splinter Review
If we destroy them, they won't be focused anymore. This patch should completely eliminate focusing invisible target in fullscreen.
Attachment #8650807 - Flags: review?(dolske)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8650807 [details] [diff] [review]
patch

Makes sense to me, but I'd rather have Dao consider if there are any other surprising implications.
Attachment #8650807 - Flags: review?(dolske)
Attachment #8650807 - Flags: review?(dao)
Attachment #8650807 - Flags: feedback+
Comment on attachment 8650807 [details] [diff] [review]
patch

This will probably have side effects for code trying to interact with the hidden nodes. E.g. when I set #navigator-toolbox to display:none, trying to open and close tabs seems to break things. Not sure if this is because of missing XBL bindings or missing layout stuff.

We do exit DOM FS when opening or closing tabs, and maybe we do this timely enough that the above case isn't a problem, but it was just an example anyway.

By the way, this patch wouldn't fix it for (non-DOM) FS.
Attachment #8650807 - Flags: review?(dao)
(In reply to Dão Gottwald [:dao] from comment #4)
> By the way, this patch wouldn't fix it for (non-DOM) FS.

It fixes it for fullscreen mode for me, at least on Windows.
(In reply to Xidorn Quan [:xidorn] (UTC+12) from comment #5)
> (In reply to Dão Gottwald [:dao] from comment #4)
> > By the way, this patch wouldn't fix it for (non-DOM) FS.
> 
> It fixes it for fullscreen mode for me, at least on Windows.

Oh right, I overlooked this line:

 #main-window[inFullscreen]:not([OSXLionFullscreen]) toolbar:not([fullscreentoolbar=true]),
Hmmm, so the listener of the keys are set in nsMenuBarFrame, and performed in nsMenuBarListener.
Attached patch patchSplinter Review
Attachment #8650807 - Attachment is obsolete: true
Attachment #8653231 - Flags: review?(enndeakin)
Attachment #8653231 - Flags: review?(enndeakin) → review+
https://hg.mozilla.org/mozilla-central/rev/312566100da6
Assignee: nobody → quanxunzhen
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
QA Whiteboard: [bugday-20150811] → [bugday-20150811] [good-first-verify]
Has STR: --- → yes
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: