mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(electron/android): re-add Element.prototype.checkVisibility check (#28173)
Regressed in https://github.com/microsoft/playwright/pull/28148.
This commit is contained in:
parent
7ffcb42551
commit
80bab8afae
@ -82,7 +82,8 @@ export function isElementStyleVisibilityVisible(element: Element, style?: CSSSty
|
|||||||
// details element for example.
|
// details element for example.
|
||||||
// All the browser implement it, but WebKit has a bug which prevents us from using it:
|
// 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
|
// 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 }))
|
if (!element.checkVisibility({ checkOpacity: false, checkVisibilityCSS: false }))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user