From ef59a3743f02c726f20e035c5d28665000fda79a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 29 Dec 2013 12:54:00 +0000 Subject: [PATCH] Fix crashes when attempting full screen mode on browsers that don't support it Fixes #311 --- plugins/tiddlywiki/fullscreen/init.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/tiddlywiki/fullscreen/init.js b/plugins/tiddlywiki/fullscreen/init.js index 7eb5a7503..58de69854 100644 --- a/plugins/tiddlywiki/fullscreen/init.js +++ b/plugins/tiddlywiki/fullscreen/init.js @@ -37,9 +37,11 @@ var toggleFullscreen = function() { exports.startup = function() { // Install the full screen handler - $tw.rootWidget.addEventListener("tw-full-screen",function(event) { - toggleFullscreen(); - }); + if(_requestFullscreen) { + $tw.rootWidget.addEventListener("tw-full-screen",function(event) { + toggleFullscreen(); + }); + } }; })();