owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.36k stars 230 forks source link

Sharing button not clickable at the bottom of charts at the bottom right of the viewport #2038

Open mlbrgl opened 1 year ago

mlbrgl commented 1 year ago

reported by @paarriagadap on slack

Description

Sharing button in the bottom right corner of charts not clickable when the chart is at the bottom of the viewport. This comes from the "Jobs" and "Feedback" buttons shadowing it, despite visually disappearing on scroll.

Expected behaviour

Sharing button clickable as usual.

Steps to reproduce

  1. Go to https://ourworldindata.org/illicit-drug-use#interactive-charts-on-opioids-cocaine-cannabis-and-illicit-drugs
  2. Resize your browser window to ~ 1440px
  3. Bring the bottom of the chart to the bottom of the viewport
  4. Try and click on the sharing icon: it doesn't get a cursor and is not clickable.

Screenshots

Screenshot 2023-03-23 at 14 30 35
larsyencken commented 1 year ago

@mlbrgl Do you have a theory on why it's happening?

mlbrgl commented 1 year ago

@larsyencken I think there are two issues here:

ikesau commented 1 year ago

I think adding a mouse-events none to the container when it disappears should fix this.

edit: nvm, it's the site-tools element which is occluding the buttons, and it's not a one-liner to fix because that element needs to exist to mount the hide-wrapper div into. But if we update the listener to apply the hide class to site-tools instead, it should work.