-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove
element.current
from useEffect
in BubbleMenu
and `F…
…loatingMenu` (#2297) * Remove `element.current` from `useEffect` dependencies Changes to the `element.current` don't trigger `useEffect` rerender and shouldn't be used in the dependency array. One discussion about is this is for example here: https://stackoverflow.com/questions/60476155/is-it-safe-to-use-ref-current-as-useeffects-dependency-when-ref-points-to-a-dom It's also causing some subtle bugs when mounting and unmounting editors. * Fix `FloatingMenu` and `BubbleMenu` element references * Fix linting errors * Don't register plugin when the editor is already destroyed; Simplify `HTMLElement` reference handling * Fix lint error
- Loading branch information
1 parent
fadafae
commit 561941d
Showing
2 changed files
with
32 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters