Skip to content

Commit

Permalink
Fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jul 24, 2024
1 parent 62c583d commit 75c459b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions static/js/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,14 @@ $(document).ready(() => {
const check = async () => {
if (isComposing || isLocked) return;

const input = $inputBox.val();
let input = $inputBox.val();
const currentKey = questionKeys[currentQuestionIndex];
const { translation } = questionsData[currentKey];
const translationLength = getSegmentedText(translation).length;

$inputBox.val(truncateInput(input, translationLength));
input = truncateInput(input, translationLength);

$inputBox.val(input);
updateBoxes();

const remainingHintableCount =
Expand Down

0 comments on commit 75c459b

Please sign in to comment.