Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Modifying tags causes text cursor (insert point) to move to start of text field. #3409

Open
openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments

Comments

@openstreetmap-trac
Copy link

Reporter: lakeyboy
[Submitted to the original trac issue database at 6.00pm, Tuesday, 21st December 2010]

I've come across an error which has the potential to accidently introduce incorrect information into the OSM database. When editing a tag text field of an existing object, attempting to insert new text anywhere within the existing text causes the text cursor to jump to the end of the text, causing what you're adding to the field to be added to the end and not where you intentionally placed the cursor. I hope i've explained this clearly enough! I'll elaborate if need be.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 10.55am, Wednesday, 22nd December 2010]

Confirmed. There is some seriously funky behaviour going on there. In particular, take this sequence of events:

  1. Create a 'highway=zzz' tag, press enter (just to set a known starting state)
  2. Enter the 'zzz' part, and move the cursor the start.
  3. Press 'a' three times, producing "aaazzz".
  4. On the third press, the cursor jumps to the end, as described in this bug report.

All kinds of bizarre stuff happens under the surface on the first three presses that is hidden due to code that tries to suppress it. For example, on the first press, the code thinks the drop down box has opened (it hasn't) and selected the first entry (bridleway). The second press and the zeroth behave "normally". The third, for reasons I don't yet understand, behaves as if you had just selected an entry from the drop down (which was never open): moving the cursor to the end is the correct behaviour in that case.

I'll attach a debug trace of the above.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 10.58am, Wednesday, 22nd December 2010]

Another closely related undesirable behaviour is that when you enter short key values (seems to happen sometimes for lengths 0, 1, 2), you instead get the first value from the autocorrect lookup (ie, "bridleway" if the key is "highway"). Haven't narrowed down the cause yet.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 11.04am, Wednesday, 22nd December 2010]

There are known problems with the auto-complete component. There is no need to report further bugs with it, I'll be looking at it when I get a chance.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 1.40pm, Wednesday, 22nd December 2010]

Fixed in 24838.

@openstreetmap-trac
Copy link
Author

Author: melb_guy
[Added to the original trac issue at 11.25am, Monday, 3rd October 2011]

This bug has unfortunately reappeared.

@openstreetmap-trac
Copy link
Author

Author: melb_guy
[Added to the original trac issue at 11.55am, Monday, 3rd October 2011]

I've just realised it does the opposite to what this bug was originally reported for. Replace the word "end" with "start" and that's what the new bug is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant