• Robert Knight's avatar
    Don't close sidebar when clicking on bucket bar background · 34521471
    Robert Knight authored
    Prevent the sidebar from closing when clicking the grey background behind
    buckets or toolbar buttons. Visually this background is part of the sidebar, so
    it seems unexpected that clicking it closes the sidebar.  Also if a user misses
    a bucket's hit target, it is annoying if the sidebar gets closed and moves the
    bucket/button.
    
    Remove the `pointer-events: none` style from the grey background behind the
    bucket bar. As a result clicks on this background will go to this background
    element instead of the document content behind it. Due to existing logic in the
    `createShadowRoot` helper, `mousedown` events within `<hypothesis-*>` element
    shadow roots have their propagation stopped and so they don't reach the code in
    `Guest` which closes the sidebar.
    34521471
Buckets.tsx 4.32 KB