chore: do not update highlight on focus outside of the recording mode (#18516)

This commit is contained in:
Pavel Feldman 2022-11-02 14:09:02 -07:00 committed by GitHub
parent 8292398692
commit b2e4f5652e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,6 +235,8 @@ class Recorder {
}
private _onFocus(userGesture: boolean) {
if (this._mode === 'none')
return;
const activeElement = this._deepActiveElement(document);
const result = activeElement ? generateSelector(this._injectedScript, activeElement, true) : null;
this._activeModel = result && result.selector ? result : null;