File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,11 +30,23 @@ function Interaction.IsHovered(win, bounds)
3030 return false
3131 end
3232
33- -- Block if inside any widget-level exclusion region (e.g. dropdown pop-ups)
33+ -- Check if element is within blocked regions (popups)
34+ -- If element bounds are entirely within blocked regions, allow it (popup elements)
3435 if win ._widgetBlockedRegions then
36+ local elementInBlockedRegion = false
3537 for _ , region in ipairs (win ._widgetBlockedRegions ) do
36- if inBounds (mX , mY , region ) then
37- return false
38+ if bounds .x >= region .x and bounds .x + bounds .w <= region .x + region .w and
39+ bounds .y >= region .y and bounds .y + bounds .h <= region .y + region .h then
40+ elementInBlockedRegion = true
41+ break
42+ end
43+ end
44+ if not elementInBlockedRegion then
45+ -- Element is not within blocked regions, check if mouse is in blocked regions
46+ for _ , region in ipairs (win ._widgetBlockedRegions ) do
47+ if inBounds (mX , mY , region ) then
48+ return false
49+ end
3850 end
3951 end
4052 end
You can’t perform that action at this time.
0 commit comments