javascript - how to prevent bubbling event for overlapping elements? -
javascript - how to prevent bubbling event for overlapping elements? -
i need clue how stop #bubble flickering move mouse pointer above it, these 2 elements placed on each other, canvas' onmousemove interfering it, utilize chrome testing.
<p id="bubble" onclick="nobubble();"></p> <canvas id="kogal" width="450" height="630" onmousedown="onmousedownkogal(this, event);" onmousemove="onmousemovekogal(this, event);" onmouseup="onmouseupkogal();" onmouseout="onmouseoutkogal();">
is possible stop onmousemove canvas when mouse pointer above #bubble? have tried preventdefault , homecoming false in several combinations no avail, give thanks tips. ^_^
event.preventdefault()
prevents default event behavior happening, page reload when submit form. want event.stoppropagation()
, prevent event bubbling out container elements.
https://developer.mozilla.org/en-us/docs/web/api/document_object_model/examples#example_5:_event_propagation
javascript
Comments
Post a Comment