• Robert Knight's avatar
    Show adder when the selection changes · 80b34eef
    Robert Knight authored
    When using touch input to manipulate the selection there are no
    mousedown/mouseup events that we can listen to and the
    touchstart/touchend events are not triggered when manipulating the
    OS-provided selection handles in the browser.
    
    Instead listen for selectionchange events and show the adder in
    response.
    
    To avoid showing the adder every time the selection handle moves which
    would be distracting, we instead buffer selectionchange events and only
    show them after a pause.
    
    When the user is using mouse input to make a selection, we ignore
    selectionchange events so that the adder does not appear until the user
    finishes making their selection.
    80b34eef
selections-test.js 2.43 KB