Skip to content

Commit

Permalink
fix(electron/android): re-add Element.prototype.checkVisibility check (
Browse files Browse the repository at this point in the history
…#28173)

Regressed in #28148.
  • Loading branch information
mxschmitt authored Nov 15, 2023
1 parent 7ffcb42 commit 80bab8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/playwright-core/src/server/injected/domUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export function isElementStyleVisibilityVisible(element: Element, style?: CSSSty
// details element for example.
// All the browser implement it, but WebKit has a bug which prevents us from using it:
// https://bugs.webkit.org/show_bug.cgi?id=264733
if (browserNameForWorkarounds !== 'webkit') {
// @ts-ignore
if (Element.prototype.checkVisibility && browserNameForWorkarounds !== 'webkit') {
if (!element.checkVisibility({ checkOpacity: false, checkVisibilityCSS: false }))
return false;
} else {
Expand Down

0 comments on commit 80bab8a

Please sign in to comment.