mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: fix inspector cli firefox tests flakiness (#20919)
This commit is contained in:
parent
91da67fab1
commit
5f9e2f3db9
@ -252,6 +252,10 @@ class Recorder {
|
||||
if (this._mode === 'none')
|
||||
return;
|
||||
const activeElement = this._deepActiveElement(document);
|
||||
// Firefox dispatches "focus" event to body when clicking on a backgrounded headed browser window.
|
||||
// We'd like to ignore this stray event.
|
||||
if (activeElement === document.body)
|
||||
return;
|
||||
const result = activeElement ? generateSelector(this._injectedScript, activeElement, this._testIdAttributeName) : null;
|
||||
this._activeModel = result && result.selector ? result : null;
|
||||
if (userGesture)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user