Skip to content

Commit 69c76ae

Browse files
authored
fix(fullscreen portals): consider the fullsceeen element is body is a video is in fullscreen (quasarframework#7480)
1 parent 33503a1 commit 69c76ae

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ui/dev/src/pages/other/app-fullscreen-portals.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@
223223
</q-card-section>
224224
</q-card>
225225

226+
<video
227+
style="width: 300px"
228+
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
229+
controls
230+
playsinline
231+
loop
232+
/>
233+
226234
<q-dialog v-model="dialog3" seamless position="bottom">
227235
<q-card class="bg-white">
228236
<q-card-section>

ui/src/utils/dom.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ export function childHasFocus (el, focusedEl) {
6464
// internal
6565
export function getBodyFullscreenElement (isFullscreen, activeEl) {
6666
return isFullscreen === true
67-
? (activeEl === document.documentElement ? document.body : activeEl)
67+
? (
68+
// when a video tag enters fullscreen activeEl is null
69+
activeEl === document.documentElement || activeEl === null
70+
? document.body
71+
: activeEl
72+
)
6873
: document.body
6974
}
7075

0 commit comments

Comments
 (0)