Skip to content

Commit f695a01

Browse files
committed
Use jQuery visibility logic
1 parent eb04f36 commit f695a01

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

web_src/js/utils/dom.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,5 @@ export function initSubmitEventPolyfill() {
237237
export function isVisible(element) {
238238
if (!element) return false;
239239

240-
const style = window.getComputedStyle(element);
241-
return style.width !== '0' &&
242-
style.height !== '0' &&
243-
style.opacity !== '0' &&
244-
style.display !== 'none' &&
245-
style.visibility !== 'hidden';
240+
return Boolean(element.offsetWidth || element.offsetHeight || element.getClientRects().length);
246241
}

0 commit comments

Comments
 (0)