mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-30 15:13:00 +00:00
Fix full screen button not supported
This commit is contained in:
@@ -67,14 +67,15 @@ exports.startup = function() {
|
||||
});
|
||||
});
|
||||
var fullscreen = $tw.utils.getFullScreenApis();
|
||||
$tw.rootWidget.addEventListener("tw-full-screen",function(event) {
|
||||
if(document[fullscreen._fullscreenElement]) {
|
||||
document[fullscreen._exitFullscreen]();
|
||||
} else {
|
||||
document.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);
|
||||
}
|
||||
});
|
||||
|
||||
if(fullscreen) {
|
||||
$tw.rootWidget.addEventListener("tw-full-screen",function(event) {
|
||||
if(document[fullscreen._fullscreenElement]) {
|
||||
document[fullscreen._exitFullscreen]();
|
||||
} else {
|
||||
document.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);
|
||||
}
|
||||
});
|
||||
}
|
||||
// If we're being viewed on a data: URI then give instructions for how to save
|
||||
if(document.location.protocol === "data:") {
|
||||
$tw.rootWidget.dispatchEvent({
|
||||
|
||||
Reference in New Issue
Block a user