From 3cf0461a1a3614f000784182bb509dceb78c2145 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Thu, 16 Jan 2025 13:20:20 -0800 Subject: [PATCH] chore: fix the scrollable locator tab (#34358) --- packages/trace-viewer/src/ui/inspectorTab.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/trace-viewer/src/ui/inspectorTab.tsx b/packages/trace-viewer/src/ui/inspectorTab.tsx index b6882a6a04..4278cdbc28 100644 --- a/packages/trace-viewer/src/ui/inspectorTab.tsx +++ b/packages/trace-viewer/src/ui/inspectorTab.tsx @@ -47,17 +47,28 @@ export const InspectorTab: React.FunctionComponent<{ setIsInspecting(false); }, [highlightedElement, setHighlightedElement, setIsInspecting]); - return
-
Locator
-
+ return
+
+
Locator
+ { + copy(highlightedElement.locator || ''); + }}> +
+
{ // Updating text needs to go first - react can squeeze a render between the state updates. setHighlightedElement({ ...highlightedElement, locator: text, lastEdited: 'locator' }); setIsInspecting(false); }} />
-
Aria
-
+ +
+
Aria snapshot
+ { + copy(highlightedElement.ariaSnapshot || ''); + }}> +
+
-
- { - copy(highlightedElement.locator || ''); - }}> -
; };