File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -525,8 +525,9 @@ export function updateWordsInputPosition(): void {
525525 : TestState . isLanguageRightToLeft ;
526526
527527 const el = document . querySelector < HTMLElement > ( "#wordsInput" ) ;
528+ const wrapperElement = document . querySelector < HTMLElement > ( "#wordsWrapper" ) ;
528529
529- if ( ! el ) return ;
530+ if ( ! el || ! wrapperElement ) return ;
530531
531532 const activeWord = getActiveWordElement ( ) ;
532533
@@ -553,10 +554,16 @@ export function updateWordsInputPosition(): void {
553554
554555 el . style . top = targetTop + "px" ;
555556
556- if ( activeWord . offsetWidth < letterHeight && isTestRightToLeft ) {
557- el . style . left = activeWord . offsetLeft - letterHeight + "px" ;
557+ if ( Config . tapeMode !== "off" ) {
558+ el . style . left = `${
559+ wrapperElement . offsetWidth * ( Config . tapeMargin / 100 )
560+ } px`;
558561 } else {
559- el . style . left = Math . max ( 0 , activeWord . offsetLeft ) + "px" ;
562+ if ( activeWord . offsetWidth < letterHeight && isTestRightToLeft ) {
563+ el . style . left = activeWord . offsetLeft - letterHeight + "px" ;
564+ } else {
565+ el . style . left = Math . max ( 0 , activeWord . offsetLeft ) + "px" ;
566+ }
560567 }
561568
562569 keepWordsInputInTheCenter ( ) ;
You can’t perform that action at this time.
0 commit comments