Only return child in scrolls findByPoint when not in active scroll regions

This commit is contained in:
Francisco Vallarino 2021-06-04 13:55:50 -03:00
parent b3333cc6be
commit d1e2988234
2 changed files with 12 additions and 2 deletions

View File

@ -336,10 +336,17 @@ makeScroll config state = widget where
& L.widget .~ makeScroll config oldState
findByPoint wenv node start point
| isPointInNodeVp realPoint node = Just 0
| not mouseInScroll && (childHovered || childDragged) = Just 0
| otherwise = Nothing
where
sctx = scrollStatus config wenv node state point
mouseInScroll = hMouseInScroll sctx || vMouseInScroll sctx
realPoint = addPoint point offset
child = Seq.index (node ^. L.children) 0
childHovered = isPointInNodeVp realPoint child
childDragged = case wenv ^. L.mainBtnPress of
Just (path, _) -> isNodeParentOfPath path child
Nothing -> False
handleEvent wenv node target evt = case evt of
Focus{} -> result where

View File

@ -652,11 +652,14 @@
- Scroll docs for message.
- Check _wniOverlay. Can it be replaced with overlayPath check?
- Maybe modify dropdown to set overlay to the list?
- Fix cursor issue when clicking/closing dropdown
Next
- Review source code documentation.
- Fix cursor issue when clicking/closing dropdown
- Fix nested wheel scroll issue.
- Fix nested wheel event.
- In general, I accidentally removed IgnoreParentEvents logic.
- Add test cases for this.
- Improve scroll test cases
- Should key, enabled, visible be exported automatically?
- Create user documentation