BenShelton / library-api

An API for accessing information related to meetings and publications of Jehovah's Witnesses
https://benshelton.github.io/library-api/
MIT License
10 stars 2 forks source link

[Bug] Hover effect on tiles gets stuck #43

Open BenShelton opened 3 years ago

BenShelton commented 3 years ago

Packages & versions

Media 0.7.0

Describe the bug

On the Control Panel when viewing media for a publication, in some cases you can have multiple image/video tiles displaying the hover effect.

Reproduction steps

  1. Go to Publication
  2. Move cursor rapidly over the window

Expected behavior

Only 1 can ever have the hover effect. Ideally when the cursor leaves the window all disappear.

Additional context

I think we can achieve this by adding the mouse position handlers to the window or page, rather than each individual item, and then passing the positions down to each tile. Then the components themselves can check if they are within those coordinates.