zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
103 stars 29 forks source link

Video Subject Viewer: Latest Annotation Stealing Focus #2272

Open ErikOstlund opened 3 years ago

ErikOstlund commented 3 years ago

Package

lib-classifier

Describe the bug

The latest annotation created will steal focus when the subject area triggers an action. When annotating on a video, the annotation appears normal. But when the video is played back and hits the timeStamp where the annotation was created, the focus is removed from the video controller and focus is now on the annotation.

To Reproduce

Steps to reproduce the behavior:

  1. Checkout the master branch
  2. In a terminal, run yarn bootstrap
  3. Once complete, cd to packages/lib-classifier and run yarn dev
  4. In a new web browser, open: https://localhost:8080/?env=production&project=13789&workflow=16843
  5. Play the video for a bit
  6. Create a Temporal Drawing annotation: A Temporal Point or TemporalRotateRectangle
  7. Note: the annotation is active and this is normal and expected.
  8. Play the video from the beginning
  9. Note: Initially, when the video starts, focus is on the Play button. But when the video plays the timestamp where the annotation was created, focus is now on the annotation

Expected behavior

When playing a video, focus should remain on the Video Controller for accessibility reasons.

Screenshots

Three states of the annotation: inactive, active and focus image

Possible Solution

Needs proper active drawing tool cleanup on the component unmount. The active mark is not being reset.

goplayoutside3 commented 5 months ago

Confirmed this still happens in https://www.zooniverse.org/projects/sophiemu/solar-jet-hunter/classify