New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drag inhibits mouseup #391
Comments
Hmm, there might be an ordering bug. But I think you should be using click rather than mouseup? Or potentially using a capturing listener. |
You're right, click is more suitable and I can't think of a situation where mouseup can't be replaced by click. Thanks! |
Looks like drag also inhibits the pan behaviour. I thought the events where namespaced and could not interfere. |
On the same element? Please include an example. |
With a drag on a child element and pointer-events:all on the parent. |
Hmm. I'm not sure how best to support that. |
It's not a big concern. But do you have an idea what changed that inhibited pointer-events:all? Maybe the stoppropagation on line 4356? |
Yes that's the one. Commenting it reverts to the old behaviour. But I agree it's still not the right way to use the zoom behaviour. |
Correct. |
I'm still tracking this one and it seems a little less consistent now. On right click, I have a mousedown when opening the context menu and then only mouseups. If I prevent the context menu, then I always have mousedown but no mouseup. On left click, I have a mouseup only the first release following the opening of the contextual menu. |
Closing this, but feel free to reopen if you have suggestions on what to change. |
I need to bind a mouseup and a drag on the same selection to be able to discriminate between a mouseup after a drag (dragend) or not (mouseup). This pattern worked with 2.4.6 but seems broken in 2.6.0. Mousedown is still working. Here is an example:
d3.select("body").append("svg:svg")
.append("svg:rect")
.attr("width", 100)
.attr("height", 100)
.attr("fill", "red")
.on("mouseup", mouseup)
.call(d3.behavior.drag()
.on("drag", drag));
function drag(){
console.log("working");
}
function mouseup(){
console.log("non-working in 2.6.0");
}
Do you want me to test further?
The text was updated successfully, but these errors were encountered: