We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51f1179 commit d1d2af5Copy full SHA for d1d2af5
src/components/component-playground.js
@@ -7,7 +7,8 @@ import FullscreenButton from './fullscreen-button';
7
8
import {
9
requestFullscreen,
10
- exitFullscreen
+ exitFullscreen,
11
+ getFullscreenElement
12
} from '../utils/fullscreen';
13
14
@@ -124,7 +125,7 @@ class ComponentPlayground extends Component {
124
125
evt.stopPropagation();
126
127
// Esc: When entering the editor or an input element the default esc-to-exit might not work anymore
- if (evt.keyCode === 27 && document.fullscreenElement) {
128
+ if (evt.keyCode === 27 && getFullscreenElement()) {
129
exitFullscreen();
130
}
131
0 commit comments