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

This commit is contained in:
Max Schmitt 2023-11-15 19:40:10 +01:00 committed by GitHub
parent bb241abaff
commit 84d1260d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>