mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Bugfix: exitFullscreen() errors
This commit is contained in:
parent
671a7a7002
commit
47bbd3d410
3 changed files with 9 additions and 12 deletions
|
|
@ -14,7 +14,7 @@ import {
|
|||
MessageSetAction
|
||||
} from 'Common/EnumsUser';
|
||||
|
||||
import { doc, $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings } from 'Common/Globals';
|
||||
import { $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings, getFullscreenElement, exitFullscreen } from 'Common/Globals';
|
||||
|
||||
import { arrayLength, inFocus } from 'Common/Utils';
|
||||
import { mailToHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
|
|
@ -242,7 +242,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
fullScreenMode: value => {
|
||||
if (this.oContent) {
|
||||
value ? this.oContent.requestFullscreen() : doc.exitFullscreen();
|
||||
value ? this.oContent.requestFullscreen() : exitFullscreen();
|
||||
} else {
|
||||
$htmlCL.toggle('rl-message-fullscreen', value);
|
||||
}
|
||||
|
|
@ -332,12 +332,9 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
event = 'webkit'+event;
|
||||
}
|
||||
if (el.requestFullscreen) {
|
||||
if (!doc.exitFullscreen && doc.webkitExitFullscreen) {
|
||||
doc.exitFullscreen = doc.webkitExitFullscreen;
|
||||
}
|
||||
this.oContent = el;
|
||||
el.addEventListener(event, () =>
|
||||
this.fullScreenMode((doc.fullscreenElement || doc.webkitFullscreenElement) === el)
|
||||
this.fullScreenMode(getFullscreenElement() === el)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue