Closed rparent closed 4 years ago
@rparent @msalihaltun I noticed a side affect of this PR. For example, in the demo, if we choose "select all nodes" from the root menu, all nodes are chosen as normal. Then if we choose "select all edges", all edges are chosen but all nodes are unselected unexpectedly. In the current unstable branch, all nodes stay as selected. I think, since context-menu is now appended to cy container, cy detects a click on itself and unselects the nodes. I played with z-index values of context-menus to prevent this behavior but couldn't manage to fix it.
I think, since context-menu is now appended to cy container, cy detects a click on itself and unselects the nodes. I played with z-index values of context-menus to prevent this behavior but couldn't manage to fix it.
@hasanbalci @rparent In this case, maybe preventing bubbling on the menu item click events with preventDefault()
can solve it by stopping the cy container from detecting the click event on itself.
@hasanbalci @msalihaltun I just pushed a commit to prevent mouse/touch events from being propagated when they occur inside the context menu, it seems to fix those unintended click issues. Does it fix your demo ?
@rparent @hasanbalci Seems fixed now for me. Will test with Newt soon.
@rparent I also tried in the demo and it's working correctly now, thanks!
@hasanbalci Works correctly in Newt after the changes as well. I think this can be merged now.
@hasanbalci @msalihaltun Thanks for the merge !
Just to know, do you have a rough idea of the delay before this gets released ?
@rparent Thank you for your contribution. We are planning to have a new release of this extension soon that should include this change.
This is a backport of #50 on the right branch and without
jQuery
.I have built and commited the new version, I don't know if you want to build for each PR or only at releases ?