[squeak-dev] Re: mouse enter/move/leave event confusion

Stephan Eggermont stephan at stack.nl
Fri Dec 4 10:33:19 UTC 2015


On 04-12-15 01:54, tim Rowledge wrote:
> Hi,
> so now I know why I can get so many spurious enter/leave events. It’s really embarrassingly dumb…
>
> When you are dragging a morph around and have the morph positioned at the event cursor point - ie not centred under it as you eventually want - then moving even moderately quickly can result in the cursor point being over the dragged morph. Which is not the canvas morph. So you’ve left the canvas morph; and you get a mouse leave event. D’oh! Then the fake-cursor-morph gets deleted, you are now over the canvas morph so you get a mouse enter event, and so on.

Hmm. conceptually I would expect to get no spurious enter/leaves when 
the morph you're dragging around is either a submorph of the canvas, or 
grabbed by the hand.

Stephan




More information about the Squeak-dev mailing list