Fix the logical error in isElementInside() (#2714)

This commit is contained in:
Sami Vänttinen 2025-10-01 16:38:11 +03:00 committed by GitHub
commit a7ae7533f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,7 +195,7 @@ const getCurrentTab = async function() {
};
// Check if element b is inside a
const isElementInside = (a, b) => (b.x >= a.x || b.right <= a.right) && (b.y >= a.y || b.bottom <= a.bottom);
const isElementInside = (a, b) => (b.x >= a.x && b.right <= a.right) && (b.y >= a.y && b.bottom <= a.bottom);
// Check if two elements overlap
const elementsOverlap = function(rect1, rect2) {