From: Anton Khorev Date: Sun, 6 Apr 2025 11:44:54 +0000 (+0300) Subject: Avoid virtual keyboard when visiting new note page X-Git-Tag: live~70^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2aa4180077bc26d631b97601e55dad62bcf17880?ds=inline;hp=-c Avoid virtual keyboard when visiting new note page --- 2aa4180077bc26d631b97601e55dad62bcf17880 diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index 0090570a9..ff4a44126 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -130,7 +130,9 @@ OSM.NewNote = function (map) { content.find("textarea") .on("input", updateControls) - .trigger("focus"); + .attr("readonly", "readonly") // avoid virtual keyboard popping up on focus + .trigger("focus") + .removeAttr("readonly"); content.find("input[type=submit]").on("click", function (e) { const location = newNoteMarker.getLatLng().wrap();