react / react/react

No blur event fired when button is disabled/removed

オープン
#9,142 コメント 23 件 リアクション 15 件 担当者 0 名 GitHub で見る

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

Component: DOM Type: Bug
主要言語
JavaScript
スター
251k
フォーク
51.4k
平均マージ
2日 4時間
マージ済み PR(30日)
53

説明

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When a focussed button becomes disabled, React does not dispatch a blur event.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).

  1. Attach a blur event to a button
  2. Focus the button
  3. Make the button disabled or remove it from the DOM

What is the expected behavior?
A blur event will be dispatched.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
15.1.0, not sure if it worked in previous versions.

Isolated test case: http://jsbin.com/fuvite/1/edit?html,css,js,output

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

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

はじめの一歩

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

調査の方向性

http://jsbin.com/fuvite/1/edit の分離されたテストケースから始め、React 15.1.0 を使用して動作を再現します。フォーカスを取得した後に無効化または削除されるボタンの focus と blur の処理を確認します。両方のシナリオで期待される blur イベントがディスパッチされ、報告された手順に対するリグレッションテストのカバレッジがあることを完了条件とします。

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

評価

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

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

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