Skip to content

Commit 7d133ca

Browse files
authored
DropdownButton click handler now captures the event instead of letting (#108)
it propagate
1 parent 9cb30a6 commit 7d133ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Lumi/Components/DropdownButton.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import React.Basic (Component, JSX, createComponent, element, fragment, make, ma
2424
import React.Basic.DOM as R
2525
import React.Basic.DOM.Components.GlobalEvents (windowEvent)
2626
import React.Basic.DOM.Components.Ref (ref)
27-
import React.Basic.DOM.Events (stopPropagation)
28-
import React.Basic.Events (handler, handler_)
27+
import React.Basic.DOM.Events (capture_, stopPropagation)
28+
import React.Basic.Events (handler)
2929
import Unsafe.Coerce (unsafeCoerce)
3030
import Unsafe.Reference (unsafeRefEq)
3131
import Web.DOM (Node)
@@ -134,7 +134,7 @@ dropdownButton =
134134
fragment
135135
[ button secondary
136136
{ title = props.label
137-
, onPress = handler_ $ toggleOpen self maybeDropdownButtonRef
137+
, onPress = capture_ $ toggleOpen self maybeDropdownButtonRef
138138
}
139139
, fold ado
140140
rootEl <- state.root

0 commit comments

Comments
 (0)