Skip to content

Commit 581bc90

Browse files
committed
handle click event only when the class of an element is the same between mouse down and up
1 parent 3ba390f commit 581bc90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Bloc/BlMouseProcessor.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ BlMouseProcessor >> canBeClickEvent: aMouseUpEvent [
3434
^ dndInProgress not
3535
and: [ previousMouseDownEvent isNotNil
3636
and: [ previousMouseDownEvent primaryButtonPressed
37-
and: [ "aMouseUpEvent target = previousMouseDownEvent target"
38-
((aMouseUpEvent position - previousMouseDownEvent position) r <= self startDragThreshold) ] ] ]
37+
and: [ aMouseUpEvent target class = previousMouseDownEvent target class
38+
and: [ (aMouseUpEvent position - previousMouseDownEvent position) r
39+
<= self startDragThreshold ] ] ] ]
3940
]
4041

4142
{ #category : #'event testing' }

0 commit comments

Comments
 (0)