Open
Bug 830265
Opened 13 years ago
Updated 3 years ago
mozRequestFullScreen fails from javascript: link or bookmarklet
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
NEW
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
216 bytes,
text/html
|
Details |
mozRequestFullScreen doesn't work inside a javascript: URL. This is strange, because most things that require clicks do work there.
I noticed this while trying to make a "Full screen" bookmarklet (because ^⌘F leaves too many toolbars visible nowadays).
Comment 1•13 years ago
|
||
An error in the Error Console shows as follows:
Warning: Request for full-screen was denied because Element.mozRequestFullScreen() was not called from inside a short running user-generated event handler.
Source file: javascript:document.documentElement.mozRequestFullScreen();
Line: 1
Comment 2•13 years ago
|
||
So for window.open() what we do with javascript: URLs is save the popup blocker state at the point when the javascript: load starts and then temporarily push it while running the script.
It looks like fullscreen doesn't use the popup blocker state; it uses IsHandlingUserInput() directly. Maybe we need to do something similar for that state for javascript: urls?
I think the main problem is that we have several different state tracking mechanisms. Both the popup blocker state and the IsHandlingUserInput state (though I'm not sure what the latter is to be honest).
Could we consolidate this to a single state tracking object and make sure to clone that for javascript URL handling?
Comment 4•13 years ago
|
||
I think that's the right approach, yes. Note that the popup blocker state already takes IsHandlingUserInput into account, and additionally looks at what kind of event is going on. My personal opinion is that the popup blocker state is what we should be using everywhere...
| Reporter | ||
Comment 5•13 years ago
|
||
It might be good to fix bug 678994 first...
Comment 6•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•