Files
tiptap/packages
Tomas Valenta 561941d5e0 fix: Remove element.current from useEffect in BubbleMenu and FloatingMenu (#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
2021-12-22 12:13:36 +01:00
..
2021-12-17 09:46:13 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 15:12:39 +01:00
2021-12-15 10:32:09 +01:00
2021-12-11 00:13:52 +01:00
2021-12-14 19:26:42 +01:00
2021-12-02 15:12:39 +01:00
2021-12-16 15:18:59 +01:00
2021-12-16 15:18:59 +01:00
2021-12-02 21:07:43 +01:00
2021-12-03 09:05:21 +01:00
2021-11-22 10:17:43 +01:00
2021-11-09 16:51:34 +01:00
2021-11-17 19:25:46 +01:00
2021-12-15 10:32:09 +01:00
2021-12-02 21:07:43 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 15:12:39 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-12-02 15:12:39 +01:00
2021-12-06 12:01:03 +01:00
2021-12-02 15:12:39 +01:00
2021-12-05 00:05:03 +01:00
2021-12-11 00:13:52 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 21:07:43 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 15:12:39 +01:00
2021-12-03 09:05:21 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-11-09 16:51:34 +01:00
2021-12-02 15:12:39 +01:00
2021-12-11 00:13:52 +01:00
2021-11-09 16:51:34 +01:00
2021-12-02 15:12:39 +01:00
2021-12-02 15:12:39 +01:00
2021-11-09 16:51:34 +01:00
2021-12-02 15:12:39 +01:00
2021-12-17 09:46:13 +01:00
2021-12-17 09:46:13 +01:00
2021-12-05 00:05:03 +01:00
2021-12-15 10:32:09 +01:00
2021-12-15 10:32:09 +01:00