plotly / plotly/plotly.js

Click events stop firing after slow "double" click (when using beforehover event handler)

オープン
#6,582 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P2
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Hello,

I'm using the plotly_click and plotly_beforehover events to get the hover label to persist when someone clicks on a data point.

The idea is that after someone clicks a store a reference to the point they've clicked on. Then in the before hover event, if that reference is populated I cancel the hover event.

(I'm doing more than this in the actual code, but this represents the problem).

If you click quite fast, not fast enough to register as a double click, but pretty quickly, as you move the mouse around. Then sometimes that causes the click events to stop being fired.

This seems to happen when there is a point that should have a persistent hover. The hover gets turned off but then no other hovers are displayed. The reference is populated but the user can't click to turn it off. So you get stuck with no hover labels showing up.

Here's a demo: https://jsfiddle.net/mdt6rqck/

It feels like the quick clicking causes some kind of hover state to get stuck? So now the click events can't get through?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされた JSFiddle を使って hover が固まる動作を再現し、ダブルクリックより遅い高速クリックと、plotly_click および plotly_beforehover ハンドラーに焦点を当てます。hover イベントとクリックイベントのエントリーポイントを追跡し、後続のクリックが抑制される理由を特定します。永続的な hover ラベルをクリアでき、後続のクリックが引き続き発火すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。