Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(recorder): inspect element when starting typing in locator editor (#28134)

Max Schmitt84d1260d1a9f
diff --git a/packages/recorder/src/recorder.tsx b/packages/recorder/src/recorder.tsx
index 69f8983c3f..3b47c7d085 100644
--- a/packages/recorder/src/recorder.tsx
+++ b/packages/recorder/src/recorder.tsx
@@ -109,9 +109,11 @@ export const Recorder: React.FC<RecorderProps> = ({
}, [paused]);
const onEditorChange = React.useCallback((selector: string) => {
+ if (mode === 'none')
+ window.dispatch({ event: 'setMode', params: { mode: 'standby' } });
setLocator(selector);
window.dispatch({ event: 'selectorUpdated', params: { selector } });
- }, []);
+ }, [mode]);
return <div className='recorder'>
<Toolbar>