We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0750f26 commit 9a4ac30Copy full SHA for 9a4ac30
frontend/src/ts/test/test-ui.ts
@@ -578,9 +578,14 @@ export function updateWordsWrapperHeight(force = false): void {
578
//limit to 3 lines
579
wrapperEl.style.height = wrapperHeight + "px";
580
} else {
581
- //show 3 lines if tape mode is on and has newlines, otherwise 1
582
- const linesToShow = TestWords.hasNewline ? 3 : 1;
583
- wrapperEl.style.height = wordHeight * linesToShow + "px";
+ //show 3 lines if tape mode is on and has newlines, otherwise use words height (because of indicate typos: below)
+ if (TestWords.hasNewline) {
+ wrapperEl.style.height = wordHeight * 3 + "px";
584
+ } else {
585
+ const wordsHeight =
586
+ document.getElementById("words")?.offsetHeight ?? wordHeight;
587
+ wrapperEl.style.height = wordsHeight + "px";
588
+ }
589
}
590
591
0 commit comments