File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -404,17 +404,16 @@ function updateWordWrapperClasses(): void {
404404export function showWords ( ) : void {
405405 $ ( "#words" ) . empty ( ) ;
406406
407- let wordsHTML = "" ;
408- if ( Config . mode !== "zen" ) {
407+ if ( Config . mode === "zen" ) {
408+ appendEmptyWordElement ( ) ;
409+ } else {
410+ let wordsHTML = "" ;
409411 for ( let i = 0 ; i < TestWords . words . length ; i ++ ) {
410412 wordsHTML += getWordHTML ( TestWords . words . get ( i ) ) ;
411413 }
412- } else {
413- wordsHTML = '<div class="word active"></div>' ;
414+ $ ( "#words" ) . html ( wordsHTML ) ;
414415 }
415416
416- $ ( "#words" ) . html ( wordsHTML ) ;
417-
418417 updateActiveElement ( undefined , true ) ;
419418 setTimeout ( ( ) => {
420419 void Caret . updatePosition ( ) ;
@@ -423,6 +422,10 @@ export function showWords(): void {
423422 updateWordWrapperClasses ( ) ;
424423}
425424
425+ export function appendEmptyWordElement ( ) : void {
426+ $ ( "#words" ) . append ( "<div class='word'><letter>ㅤ</letter></div>" ) ;
427+ }
428+
426429const posUpdateLangList = [ "japanese" , "chinese" , "korean" ] ;
427430function shouldUpdateWordsInputPosition ( ) : boolean {
428431 const language = posUpdateLangList . some ( ( l ) => Config . language . startsWith ( l ) ) ;
You can’t perform that action at this time.
0 commit comments