Skip to content

Commit

Permalink
fix tab při psaní
Browse files Browse the repository at this point in the history
  • Loading branch information
Firu115 committed Dec 5, 2024
1 parent f95eacd commit 91bd827
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion frontend/src/components/PsaniMenu.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { onMounted, onUnmounted, ref } from "vue";
import { nastaveniJmeno, prihlasen } from "../stores";
import { saveNastaveni } from "../utils";
Expand Down Expand Up @@ -45,8 +45,20 @@ onMounted(() => {
delka.value = obj.delka ? obj.delka : 60
klavModel.value = obj.klavesnice
}
document.addEventListener("keydown", disableTab)
})
onUnmounted(() => {
document.removeEventListener("keydown", disableTab)
})
function disableTab(e: KeyboardEvent) {
if (e.which == 9) {
e.preventDefault();
}
}
function disabledBtn(e: KeyboardEvent) {
e.preventDefault()
}
Expand Down

0 comments on commit 91bd827

Please sign in to comment.