Skip to content

Clicking legend item causes legend to scroll #2387

Closed
@chriddyp

Description

@chriddyp

Taking from https://community.plot.ly/t/clicking-legend-entry-causes-legend-to-scroll/3361

This came up in the Dash workshop with one of the attendee's apps. When they click on a legend item, the legend scrolls before the click is fired, causing the legend click to fire on a different item. Very annoying!

One of the attendees and I recreated an example here: https://codepen.io/chubukov/pen/rJdZdz?editors=0010. I can't get it ti misbehave on my computer, but the attendee can. The attendee claims that it is part of the grouped legend functionality, as this example (without groups) https://codepen.io/chriddyp/pen/RQMBmJ?editors=1111 works fine for them.

Attendee says:

I wonder if it has something to do with the extra entries per legendgroup. I played with markers vs lines also, don't think that matters.
It's only clicking in specific spots that triggers the scroll. It seems to be just under the letters that tends to do it. Maybe just when the pointer is about to shift from the hand to the arrow? Not sure exactly, maybe there's some automated way to click in every pixel and see?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions