mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 13:50:25 +03:00
fix: stricter condition for Firefox codegen tests workaround (#20998)
This patch fixes the following tests on WebKit @ Darwin: - library/inspector/cli-codegen-2.spec.ts:197:7 › cli codegen › should download files - library/inspector/cli-codegen-2.spec.ts:428:7 › cli codegen › should update hover model on action
This commit is contained in:
parent
d7a0b3bb4e
commit
1b441ef4f0
@ -239,7 +239,7 @@ export class Recorder {
|
||||
const activeElement = this._deepActiveElement(this.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 === this.document.body)
|
||||
if (userGesture && activeElement === this.document.body)
|
||||
return;
|
||||
const result = activeElement ? generateSelector(this._injectedScript, activeElement, this._testIdAttributeName) : null;
|
||||
this._activeModel = result && result.selector ? result : null;
|
||||
|
Loading…
Reference in New Issue
Block a user