File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -323,8 +323,13 @@ function RemoteFunctions(config) {
323323
324324 // the box width and the positions where it should be placed
325325 const boxWidth = 82 ;
326- const leftPos = ( elemBounds . right - boxWidth ) ;
327- const topPos = ( elemBounds . top - 30 < 0 ? elemBounds . top + elemBounds . height + 5 : elemBounds . top - 30 ) ;
326+ const scrollLeft = window . pageXOffset || document . documentElement . scrollLeft ;
327+ const scrollTop = window . pageYOffset || document . documentElement . scrollTop ;
328+
329+ const leftPos = elemBounds . right - boxWidth + scrollLeft ;
330+ const topPos = ( elemBounds . top - 30 < 0
331+ ? elemBounds . top + elemBounds . height + 5
332+ : elemBounds . top - 30 ) + scrollTop ;
328333
329334 // the icons that is displayed in the box
330335 const ICONS = {
@@ -371,7 +376,7 @@ function RemoteFunctions(config) {
371376 font-size: 12px;
372377 font-family: Arial, sans-serif;
373378 z-index: 2147483647;
374- position: fixed ;
379+ position: absolute ;
375380 left: ${ leftPos } px;
376381 top: ${ topPos } px;
377382 width: ${ boxWidth } px;
You can’t perform that action at this time.
0 commit comments