From 17ab002c04d8e2358bc1c511b0d7dba051885ed1 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 25 Dec 2024 05:08:44 +0300 Subject: [PATCH] Remove active class from addNoteButton only in page.unload() Same reasons as in the previous commit. --- app/assets/javascripts/index/new_note.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index eab4b258a..6cb8db215 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -96,9 +96,7 @@ OSM.NewNote = function (map) { newNoteMarker.addTo(map); addHalo(newNoteMarker.getLatLng()); - newNoteMarker.on("remove", function () { - addNoteButton.removeClass("active"); - }).on("dragend", function () { + newNoteMarker.on("dragend", function () { content.find("textarea").focus(); }); } @@ -158,7 +156,6 @@ OSM.NewNote = function (map) { createNote(location, text, (feature) => { content.find("textarea").val(""); addCreatedNoteMarker(feature); - addNoteButton.removeClass("active"); OSM.router.route("/note/" + feature.properties.id); }); }); -- 2.39.5