Skip to content
Snippets Groups Projects

Resolve "Eingabe einer Zahl außerhalb des Kommentarfeldes trägt Zahl in Score ein"

Files
3
@@ -18,6 +18,7 @@
<v-flex xs5 class="score-flex">
<span class="mr-2">Score:</span>
<input class="score-text-field"
v-shortkey="'numeric'" @shortkey="handleKeypress"
id="score-input"
type="number"
step="0.5"
@@ -172,6 +173,15 @@ export default {
} else {
throw new Error("Can't skip submission when skippable is false for AnnotatedSubmissionBottomToolbar.")
}
},
handleKeypress (event) {
// only handle keypress if nothing is focused
if (document.activeElement.tagName === "BODY") {
this.score = event.key
const scoreInput = document.getElementById('score-input')
scoreInput.scrollIntoView()
scoreInput.focus()
}
}
}
}
Loading