Merge pull request #107 from zonghaoyuan/fix/fullscreen-fkey-in-input
fix(play): skip fullscreen shortcut when typing in text inputs
This commit is contained in:
@@ -1503,6 +1503,8 @@ function PlayInner() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function onKey(e: KeyboardEvent) {
|
function onKey(e: KeyboardEvent) {
|
||||||
|
const tag = (e.target as HTMLElement)?.tagName;
|
||||||
|
if (tag === "INPUT" || tag === "TEXTAREA" || (e.target as HTMLElement)?.isContentEditable) return;
|
||||||
if (e.key === "f" || e.key === "F") {
|
if (e.key === "f" || e.key === "F") {
|
||||||
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user