PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/compose/index.js +10 -0 23.8.0 → 24.1.0 View file →
@@ -1532,8 +1532,9 @@
1532 1532 );
1533 1533 if (ignoreForRelatedTarget && event.relatedTarget?.closest(ignoreForRelatedTarget)) {
1534 1534 return;
1535 1535 }
1536 + clearTimeout(blurCheckTimeoutIdRef.current);
1536 1537 blurCheckTimeoutIdRef.current = setTimeout(() => {
1537 1538 if (!document.hasFocus()) {
1538 1539 event.preventDefault();
1539 1540 return;
@@ -2050,8 +2051,17 @@
2050 2051 function useResizeObserver(callback, resizeObserverOptions = {}) {
2051 2052 const callbackEvent = useEvent(callback);
2052 2053 const observedElementRef = (0, import_element22.useRef)(null);
2053 2054 const resizeObserverRef = (0, import_element22.useRef)(void 0);
2055 + (0, import_element22.useEffect)(() => {
2056 + if (observedElementRef.current) {
2057 + resizeObserverRef.current?.observe(
2058 + observedElementRef.current,
2059 + resizeObserverOptions
2060 + );
2061 + }
2062 + return () => resizeObserverRef.current?.disconnect();
2063 + }, []);
2054 2064 return useEvent((element) => {
2055 2065 if (element === observedElementRef.current) {
2056 2066 return;
2057 2067 }