mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(recorder): inspect element when starting typing in locator editor (#28134)
This commit is contained in:
parent
bb241abaff
commit
84d1260d1a
@ -109,9 +109,11 @@ export const Recorder: React.FC<RecorderProps> = ({
|
|||||||
}, [paused]);
|
}, [paused]);
|
||||||
|
|
||||||
const onEditorChange = React.useCallback((selector: string) => {
|
const onEditorChange = React.useCallback((selector: string) => {
|
||||||
|
if (mode === 'none')
|
||||||
|
window.dispatch({ event: 'setMode', params: { mode: 'standby' } });
|
||||||
setLocator(selector);
|
setLocator(selector);
|
||||||
window.dispatch({ event: 'selectorUpdated', params: { selector } });
|
window.dispatch({ event: 'selectorUpdated', params: { selector } });
|
||||||
}, []);
|
}, [mode]);
|
||||||
|
|
||||||
return <div className='recorder'>
|
return <div className='recorder'>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user