Skip to content

Commit

Permalink
Revise pointer-events handling for bucket bar container
Browse files Browse the repository at this point in the history
In 3452147 the `pointer-events: none` style was
removed from the bucket bar background. This fixed a problem where clicks
in-between buckets (eg. when trying to click on a bucket) could cause the
sidebar to close. It introduced a new issue however where it made clicking on
page elements behind the bucket bar impossible. This can interfere with clicking
on scroll bar thumbs in pages where the thumb gets drawn below the Hypothesis
sidebar for example.

This commit adds `pointer-events: none` back to this container. The next commit
will address the problem that removing it aimed to resolve, but in a different
way.
  • Loading branch information
robertknight committed Jul 6, 2023
1 parent fcadcee commit b1977ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/annotator/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ export class Sidebar implements Destroyable {

// Use a grey background, with lower opacity with the sidebar is
// collapsed, so the page content behind it can be read.
'bg-grey-2 sidebar-collapsed:bg-black/[.08]'
'bg-grey-2 sidebar-collapsed:bg-black/[.08]',

// Allow pointer events to go through this container to page elements
// (eg. scroll bar thumbs) which are behind it.
'pointer-events-none'
);
this.iframeContainer.append(sidebarEdge);

Expand Down

0 comments on commit b1977ff

Please sign in to comment.