Skip to content

Commit a04e052

Browse files
znbangpravic
authored andcommitted
Handle click event in sinking phase
1 parent 446f5f1 commit a04e052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wrapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (e *eventMapper) addMethod(name string, nf func(args ...*Value) *Value) {
5454

5555
func (e *eventMapper) onClick(fn func()) {
5656
e.behaviorEventHandlerList = append(e.behaviorEventHandlerList, func(he *Element, params *BehaviorEventParams) bool {
57-
if params.Cmd() == BUTTON_CLICK {
57+
if params.Cmd() == BUTTON_CLICK && params.Phase() == SINKING {
5858
fn()
5959
}
6060
return false

0 commit comments

Comments
 (0)