From 20f29113660386b782dddf98106bc8e536ff6222 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Fri, 7 Apr 2017 16:12:48 +0200 Subject: [PATCH] Fix #1706. Auto-exit from full-screen mode --- web/client/epics/fullscreen.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/client/epics/fullscreen.js b/web/client/epics/fullscreen.js index aa604b7caa..114573466c 100644 --- a/web/client/epics/fullscreen.js +++ b/web/client/epics/fullscreen.js @@ -43,7 +43,10 @@ const toggleFullscreenEpic = action$ => Rx.Observable.fromEvent(document, getFullScreenEvent()) .filter(() => screenfull.element !== element) .map( () => setControlProperty("fullscreen", "enabled", false) ), - Rx.Observable.of(setControlProperty("fullscreen", "enabled", action.enable)) + Rx.Observable.of(setControlProperty("fullscreen", "enabled", action.enable)), + Rx.Observable.fromEvent(window, "hashchange") + .do(() => screenfull.exit()) + .map( () => setControlProperty("fullscreen", "enabled", false) ) ); }); /**