Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addr:housename textbox skips to the end 'onkeypress' #9233

Closed
UKChris-osm opened this issue Aug 6, 2022 · 3 comments
Closed

addr:housename textbox skips to the end 'onkeypress' #9233

UKChris-osm opened this issue Aug 6, 2022 · 3 comments
Labels
bug A bug - let's fix this! usability An issue with ease-of-use or design

Comments

@UKChris-osm
Copy link

UKChris-osm commented Aug 6, 2022

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?

id-onkeypress.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

@UKChris-osm
Copy link
Author

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.

@1ec5
Copy link
Collaborator

1ec5 commented Aug 9, 2022

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.

@tyrasd tyrasd added usability An issue with ease-of-use or design bug A bug - let's fix this! labels May 26, 2023
@tyrasd
Copy link
Member

tyrasd commented May 26, 2023

this was fixed in 14c7525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this! usability An issue with ease-of-use or design
Projects
None yet
Development

No branches or pull requests

3 participants