mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-09-11 12:05:35 +03:00
Do not pass events to selectList children when they are not visible (#230)
This commit is contained in:
parent
ff4ad25928
commit
df6ae02edc
@ -341,6 +341,12 @@ makeSelectList widgetData items makeRow config state = widget where
|
||||
| btn == wenv ^. L.mainButton -> result where
|
||||
result = Just $ resultReqs node [SetFocus (node ^. L.info . L.widgetId)]
|
||||
|
||||
Click point _ _
|
||||
| outsideVp point -> Just ignoreEvtResult
|
||||
|
||||
Move point
|
||||
| outsideVp point -> Just ignoreEvtResult
|
||||
|
||||
Focus prev -> handleFocusChange node prev (_slcOnFocusReq config)
|
||||
|
||||
Blur next -> result where
|
||||
@ -363,6 +369,10 @@ makeSelectList widgetData items makeRow config state = widget where
|
||||
isSelectKey code = isKeyReturn code || isKeySpace code
|
||||
_ -> Nothing
|
||||
|
||||
where
|
||||
outsideVp point = not (pointInRect point (wenv ^. L.viewport))
|
||||
ignoreEvtResult = resultReqs node [IgnoreChildrenEvents]
|
||||
|
||||
highlightNext wenv node = highlightItem wenv node nextIdx where
|
||||
tempIdx = _hlIdx state
|
||||
nextIdx
|
||||
|
Loading…
Reference in New Issue
Block a user