• Robert Knight's avatar
    Remove slider content from DOM when fully collapsed · 1660d3b0
    Robert Knight authored
     - Set `display: none` on the content of a Slider when it is fully
       collapsed, so that the DOM nodes are removed from keyboard navigation
       order
    
     - Make the collapse animation work more reliably across browsers by
       forcing a synchronous layout after changing the DOM node's height
       from "auto" to a fixed pixel size. In Chrome and Firefox neither
       `setTimeout(callback, 0)` nor `requestAnimationFrame` reliably
       ensured that the browser "saw" the change from "auto" =>
       fixed height instead of "seeing" a change from "auto" directly to 0,
       which does not get animated
    1660d3b0
slider.js 3.26 KB