@samitouri / QOS-React-1 / commits / 02bd4458f7

[DevTools] Double clicking the root should jump to the beginning of the timeline (#34704)

Unlike the rects, this never toggles. It just jumps.

Sebastian Markbåge committed Oct 3, 2025 at 11:52 UTC 02bd4458f77e60b5631ff2f0e30b05b8b3a56d6d
1 file changed +13
packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseRects.js
+13
@@ -330,12 +330,25 @@ function SuspenseRectsContainer(): React$Node {
330 });
331 }
332
333 + function handleDoubleClick(event: SyntheticMouseEvent) {
334 + if (event.defaultPrevented) {
335 + // Already clicked on an inner rect
336 + return;
337 + }
338 + event.preventDefault();
339 + suspenseTreeDispatch({
340 + type: 'SUSPENSE_SET_TIMELINE_INDEX',
341 + payload: 0,
342 + });
343 + }
344 +
345 const isRootSelected = roots.includes(inspectedElementID);
346
347 return (
348 <div
349 className={styles.SuspenseRectsContainer}
350 onClick={handleClick}
351 + onDoubleClick={handleDoubleClick}
352 data-highlighted={isRootSelected}>
353 <ViewBox.Provider value={boundingBox}>
354 <div