addr:housename textbox skips to the end 'onkeypress'
URL
https://www.openstreetmap.org/#map=19/51.04120/-3.06323
How to reproduce the issue?
When editing an addr:housename tag, iD will skip to the end of the text area if you attempt to edit a character that isn't at the end of the text.
1: Attempted to edit any instance of addr:housename 2: Select anywhere in the text box and type something (or press delete). 3: The text pointer will skip to the end of the text box upon a keypress event.
Screenshot(s) or anything else?
https://user-images.githubusercontent.com/59393694/183243211-3fc4b622-8a8b-4ce8-bf87-869cae9f056f.mp4
Which deployed environments do you see the issue in?
Released version at openstreetmap.org/edit, Development version at ideditor.netlify.app, RapiD version at mapwith.ai/rapid
What version numbers does this issue effect?
2.21.1
Which browsers are you seeing this problem on?
Chrome, Edge
I just tried using the Developer Tools to remove an event listener from this element that's triggered upon "input" and this seems to remove the problem.
This happens on a lot of fields that iD uses to label features on the map or format in some way. The addr:housenumber and addr:unit fields are particularly problematic, because I often need to edit the ranges in non-sequential order, but then the live update and validation causes my input to get mangled. The live updating is a cool effect, but I don’t think much would be lost by making the map update onblur. Unfortunately, we’ve had a lot of issues in the past with edits not taking or being misapplied because of elements getting detached from the DOM before they’ve had a chance to lose focus, such as in #5449 #5824 #6028.
this was fixed in 14c752548