diff --git a/app/client/src/utils/boxHelpers.ts b/app/client/src/utils/boxHelpers.ts index 5ade38372de3..040735f06e50 100644 --- a/app/client/src/utils/boxHelpers.ts +++ b/app/client/src/utils/boxHelpers.ts @@ -6,10 +6,10 @@ export interface Rect { } export const areIntersecting = (r1: Rect, r2: Rect) => { - return !( - r2.left >= r1.right || - r2.right <= r1.left || - r2.top >= r1.bottom || - r2.bottom <= r1.top + return ( + r2.left < r1.right && + r2.right > r1.left && + r2.top < r1.bottom && + r2.bottom > r1.top ); };