File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ class LiveTranslatorManager {
300
300
if ( node instanceof Text ) {
301
301
const clientRect = getBoundingClientRect ( node ) ;
302
302
position . top = clientRect . top + window . scrollY ;
303
- position . left = clientRect . left + window . screenX ;
303
+ position . left = clientRect . left + window . scrollX ;
304
304
const elemOnTop = document . elementFromPoint ( clientRect . left + clientRect . width / 2 , clientRect . top + clientRect . height / 2 ) ;
305
305
isVisible = isVisible ||
306
306
node . parentElement . contains ( elemOnTop ) ||
@@ -309,7 +309,7 @@ class LiveTranslatorManager {
309
309
else {
310
310
const clientRect = node . getClientRects ( ) [ 0 ] ;
311
311
position . top = clientRect . top + clientRect . height - 10 + window . scrollY ;
312
- position . left = clientRect . left + window . screenX ;
312
+ position . left = clientRect . left + window . scrollX ;
313
313
const elemOnTop = document . elementFromPoint ( clientRect . left + clientRect . width / 2 , clientRect . top + clientRect . height / 2 ) ;
314
314
isVisible = isVisible ||
315
315
node . contains ( elemOnTop ) ||
Original file line number Diff line number Diff line change @@ -356,15 +356,15 @@ class LiveTranslatorManager {
356
356
if ( node instanceof Text ) {
357
357
const clientRect = getBoundingClientRect ( node )
358
358
position . top = clientRect . top + window . scrollY
359
- position . left = clientRect . left + window . screenX
359
+ position . left = clientRect . left + window . scrollX
360
360
const elemOnTop = document . elementFromPoint ( clientRect . left + clientRect . width / 2 , clientRect . top + clientRect . height / 2 )
361
361
isVisible = isVisible ||
362
362
node . parentElement . contains ( elemOnTop ) ||
363
363
this . _wrapper . contains ( elemOnTop )
364
364
} else {
365
365
const clientRect = node . getClientRects ( ) [ 0 ]
366
366
position . top = clientRect . top + clientRect . height - 10 + window . scrollY
367
- position . left = clientRect . left + window . screenX
367
+ position . left = clientRect . left + window . scrollX
368
368
const elemOnTop = document . elementFromPoint ( clientRect . left + clientRect . width / 2 , clientRect . top + clientRect . height / 2 )
369
369
isVisible = isVisible ||
370
370
node . contains ( elemOnTop ) ||
You can’t perform that action at this time.
0 commit comments