mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Prevent mouseup from turning into a click
Mouseup was turning into a click on whatever was the last thing clicked. In this walkthrough, this would sometimes be the "Add Area" mode button, which would re-enter the add area mode and throw away the user's drawing. (I have no idea why.)
This commit is contained in:
@@ -141,6 +141,8 @@ export function behaviorDraw(context) {
|
||||
d3.select(window).on('keyup.space-block', function() {
|
||||
disableSpace = false;
|
||||
d3.select(window).on('keyup.space-block', null);
|
||||
d3.event.preventDefault();
|
||||
d3.event.stopPropagation();
|
||||
});
|
||||
|
||||
d3.event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user