mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 10:08:40 +01:00
Switch to useEventListener
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { useEventListener, useLocalStorage } from "@vueuse/core";
|
||||
import type { Emitter } from "mitt";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, inject, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
||||
@@ -174,7 +174,7 @@ onMounted(async () => {
|
||||
emitter?.on("stateSelected", selectState);
|
||||
|
||||
if (configStore.config.EJS_KEYBOARD_LOCK && "keyboard" in navigator) {
|
||||
document.addEventListener("fullscreenchange", () => {
|
||||
useEventListener(document, "fullscreenchange", () => {
|
||||
if (document.fullscreenElement && navigator.keyboard.lock) {
|
||||
navigator.keyboard.lock([
|
||||
"Escape",
|
||||
|
||||
Reference in New Issue
Block a user