Skip to content

Commit f7edf7c

Browse files
committed
Bug fix
Fix Fullcreen and textarea conflict
1 parent b4d3cbc commit f7edf7c

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

chrome/script.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,18 @@ function in_meet_main(){
292292
}
293293

294294
function openInFullScreen(){
295-
if (document.fullscreenElement){
296-
document.exitFullscreen();
297-
}
298-
else{
299-
let element = [...document.querySelectorAll("video")].filter(x=>x.style.display!="none")[0];
300-
if (element){element.requestFullscreen()}
301-
}
295+
if (document.fullscreenElement){
296+
document.exitFullscreen();
302297
}
298+
else{
299+
let element = [...document.querySelectorAll("video")].filter(x=>x.style.display!="none")[0];
300+
if (element){element.requestFullscreen()}
301+
}
302+
}
303303
function hotKeyFullscreenHandler(e){
304304
if (e.keyCode == 70){
305-
openInFullScreen()
305+
if (document.activeElement.tagName.toLowerCase() !== "textarea"){
306+
openInFullScreen()
307+
}
306308
}
307309
}

meet.user.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -594,17 +594,19 @@ function in_meet_main(){
594594
}
595595

596596
function openInFullScreen(){
597-
if (document.fullscreenElement){
598-
document.exitFullscreen();
599-
}
600-
else{
601-
let element = [...document.querySelectorAll("video")].filter(x=>x.style.display!="none")[0];
602-
if (element){element.requestFullscreen()}
603-
}
597+
if (document.fullscreenElement){
598+
document.exitFullscreen();
604599
}
600+
else{
601+
let element = [...document.querySelectorAll("video")].filter(x=>x.style.display!="none")[0];
602+
if (element){element.requestFullscreen()}
603+
}
604+
}
605605
function hotKeyFullscreenHandler(e){
606606
if (e.keyCode == 70){
607-
openInFullScreen()
607+
if (document.activeElement.tagName.toLowerCase() !== "textarea"){
608+
openInFullScreen()
609+
}
608610
}
609611
}
610612

0 commit comments

Comments
 (0)