]> git.openstreetmap.org Git - rails.git/commitdiff
Call removeNewNoteMarker() only from page.unload()
authorAnton Khorev <tony29@yandex.ru>
Wed, 25 Dec 2024 02:04:43 +0000 (05:04 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 31 Dec 2024 23:13:59 +0000 (02:13 +0300)
It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().

app/assets/javascripts/index/new_note.js

index 4cab9b797517f580f2bfcfd4cde75a001009ba9c..eab4b258a3808c00bf04a0b757627e19aa98835e 100644 (file)
@@ -158,7 +158,6 @@ OSM.NewNote = function (map) {
       createNote(location, text, (feature) => {
         content.find("textarea").val("");
         addCreatedNoteMarker(feature);
-        removeNewNoteMarker();
         addNoteButton.removeClass("active");
         OSM.router.route("/note/" + feature.properties.id);
       });