react-component / react-component/trigger

Animated popups can get stuck open if mouse enters then leaves very quickly

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

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

主要言語
TypeScript
スター
391
フォーク
245
PR マージ指標
30日以内にマージされた PR はありません

説明

Pretty much what the title says. I'm on version 4.0.0-alpha.7. Given an element like this:

<Trigger
  action={["hover"]}
  popup={<span>Hello There</span>}
  popupTransitionName="fade"
  mouseLeaveDelay={0}
  popupAlign={{
    points: ["tc", "bc"],
    offset: [0, 3]
  }}
>
  <p>Test</p>
</Trigger>

And a style like the fade animation from rc-animate's examples. Or even something simple like this:

.rc-trigger-popup {
  display: inline-block;
  opacity: 1;
  transition: opacity 1s;
}

.rc-trigger-popup-hidden {
  display: none;
}

.fade-enter-active {
  opacity: 1 !important;
}

.fade-leave-active {
  opacity: 0;
}

For the most part the trigger/popup works normally. Hovering over the "Test" text creates the popup, which fades in, and then fades out when you stop hovering over the text. The issue comes up when you move your mouse quickly over the text. Sometimes it works normally, other times the popup gets stuck open even after the mouse has left. Increasing the mouseLeaveDelay seems to mitigate the problem, but that's not really a solution.

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

ソースファイルもテストも指定されていません。まず、提供された Trigger の例を fade トランジションと素早いマウス移動で再現し、その後 hover と leave の動作を追跡してください。ポインターが領域を離れた後、素早い進入と退出の最中も含めて、ポップアップが確実に閉じれば完了です。

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

評価

技術スタック
react, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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