File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/BootstrapBlazor/wwwroot/modules Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export async function toggle(options) {
1414
1515 if ( el !== null ) {
1616 if ( isFullscreen ( ) ) {
17- await document . exitFullscreen ( )
17+ await exitFullscreen ( el ) ;
1818 }
1919 else {
2020 await enterFullscreen ( el ) ;
@@ -25,6 +25,16 @@ export async function toggle(options) {
2525const enterFullscreen = async el => {
2626 await el . requestFullscreen ( ) ;
2727
28+ updateFullscreenState ( el ) ;
29+ }
30+
31+ const exitFullscreen = async el => {
32+ await document . exitFullscreen ( )
33+
34+ updateFullscreenState ( el ) ;
35+ }
36+
37+ const updateFullscreenState = el => {
2838 if ( ! isFullscreen ( ) ) {
2939 el . classList . remove ( 'bb-fs-open' ) ;
3040 document . documentElement . classList . remove ( 'bb-fs-open' ) ;
You can’t perform that action at this time.
0 commit comments