Smooth-Div-Scroll icon indicating copy to clipboard operation
Smooth-Div-Scroll copied to clipboard

is event.stopPropagation() necessary?

Open mjvotaw opened this issue 11 years ago • 2 comments

I'm using your plugin as part of a dropdown menu, to display a series of items that the user can horizontally scroll through. The mouseleave event on line 435 prevents the dropdown from closing, because it stops the event from bubbling up to its container.

While this is easy enough to work around (I just have a second mouseleave event on the element I smothDivScoll'ed), I have to wonder if stopping the event propagation is necessary? If I comment out the offending line, there doesn't appear to be any immediate problems, but I'm by no means using all of the functionality available in this plugin.

mjvotaw avatar Feb 27 '14 21:02 mjvotaw

No, I don't think this is necessary. You could comment them out in a copy and report back if it generates any negative side effects. If not, I can remove them. :-)

tkahn avatar Mar 07 '14 15:03 tkahn

As far as I can tell, there haven't been any negative side effects. I commented them out last week when I posted about this, and as far as I can tell, everything seems to be working as expected.

mjvotaw avatar Mar 07 '14 15:03 mjvotaw