diff --git a/packages/block-editor/src/utils/dom.js b/packages/block-editor/src/utils/dom.js index 78d235000e33d..e41ade344e49d 100644 --- a/packages/block-editor/src/utils/dom.js +++ b/packages/block-editor/src/utils/dom.js @@ -112,16 +112,11 @@ function isElementVisible( element ) { return false; } - const style = viewport.getComputedStyle( element ); - if ( - style.display === 'none' || - style.visibility === 'hidden' || - style.opacity === '0' - ) { - return false; - } - - return true; + return element.checkVisibility( { + opacityProperty: true, + contentVisibilityAuto: true, + visibilityProperty: true, + } ); } /**