1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-16 12:14:14 +02:00

Run <Slate />'s focus event listeners after <Editable />'s focus handlers in React >= 17 (#4920)

* use focusin and focusout without capture if react >= 17

See https://github.com/facebook/react/pull/19186 for details on changes to `onFocus` and `onBlur`

* more accurate name for react version check const

* add changeset

* add comment about react >= 17 focus event listeners
This commit is contained in:
Adrien Wald
2022-04-03 17:08:25 +01:00
committed by GitHub
parent 9892cf0ffb
commit f6b7ca1f97
3 changed files with 28 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': patch
---
fix useFocused hook in react >= 17