Fix the logical error in isElementInside()

This commit is contained in:
varjolintu 2025-10-01 07:09:25 +03:00
parent b51f318dea
commit 1f184256dc

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) {