From 60c002f94a80ef03a91edcd5c8d6019a59a07cd0 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 29 Nov 2023 16:32:22 +0100 Subject: [PATCH] Call commitDrawing instead of stopDrawing on ESC fix #1428 --- umap/static/umap/js/umap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 48944b51..2bf4737a 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -559,7 +559,7 @@ L.U.Map.include({ this.help.show('edit') } if (e.keyCode === L.U.Keys.ESC) { - if (this.editEnabled) this.editTools.stopDrawing() + if (this.editEnabled) this.editTools.commitDrawing() if (this.measureTools.enabled()) this.measureTools.stopDrawing() } }