src/LiveDevelopment/Agents/RemoteFunctions.js
function _scrollHandler(e) {
        // Document scrolls can be updated immediately. Any other scrolls
        // need to be updated on a timer to ensure the layout is correct.
        if (e.target === window.document) {
            redrawHighlights();
        } else {
            if (_remoteHighlight || _localHighlight) {
                window.setTimeout(redrawHighlights, 0);
            }
        }
    }
function _scrollHandler(e) {
        // Document scrolls can be updated immediately. Any other scrolls
        // need to be updated on a timer to ensure the layout is correct.
        if (e.target === window.document) {
            redrawHighlights();
        } else {
            if (_remoteHighlight || _localHighlight) {
                window.setTimeout(redrawHighlights, 0);
            }
        }
    }
function _scrollHandler ( e ) { // Document scrolls can be updated immediately. Any other scrolls // need to be updated on a timer to ensure the layout is correct. if ( e . target === window . document ) { redrawHighlights ( ) ; } else { if ( _remoteHighlight || _localHighlight ) { window . setTimeout ( redrawHighlights , 0 ) ; } } }
Add a capture-phase scroll listener to update highlights when any element scrolls.
Add a capture - phase scroll listener to update highlights when any element scrolls .