openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.36k stars 1.21k forks source link

Shortcut 2 disaster #9398

Open jidanni opened 1 year ago

jidanni commented 1 year ago

I was just reading https://github.com/openstreetmap/iD/issues/9395#issuecomment-1334134084 So decided to give it a try. I was enjoying adding nodes to a way with the spacebar, until I realized that two taps of the space bar in the same spot didn't end the line. (It's "mouse over men": You got to have a real mouse if you want to click in the same spot to end a way, apparently.) That is bug one.

So then I put in the cursor on the Line button. I learned via the help balloons about the shortcut "2".

So I guessed that maybe "2" is the way to end the line using keyboard shortcuts.

So, okay, I started the line a/k/a way via this 2 shortcut.

And happily added nodes using the space bar.

And, of course sooner or later it is time to end the way, so to end it I just reached for the 2 key on my keyboard and guess what happened...

Kabam! Entire painstakingly entered way blown to smithereens. Eliminated from the face of the earth.

That is bug two.

So now you're saying, "Dry your weeping eyes and simply reach for the undo/redo buttons."

Well the undo/redo buttons deny any hint that any of this ever happened.

That is bug number three.

By the way, it's that "2" that wiped the undo memory, not the space bar to blame.

Digging in the help manual, we learn we're supposed to hit Enter. "My mistake," as Pee Wee Herman might have said.

Well it should also say, "Don't hit 2 again because something bad will happen."

DujaOSM commented 1 year ago

While the above might not be a perfect issue report, I'd like to thank Jidanni for rising the issue (which has also hit myself a couple of times), and try to summarize steps for reproduction:

  1. Begin drawing a line or an area, and draw several points
  2. While still in drawing mode, hit either 1, 2, 3, or Delete on the keyboard

As the result, the entered data is iretrievably gone, and cannot be restored by Undo.

Preferably, neither of the shortcuts (and probably none at all, except Backspace) should have any effect while in line drawing mode. Alternatively, Undo should restore the last drawn state.

DujaOSM commented 1 year ago

P.S. We do need some shortcuts to work in this mode, such as the ones that (de)activate visibility of various features (B for Backgrounds, U for Map features or G for Green changes).

But should anyone want to tackle this, please also get rid of the goddam L for Locate me (which has usability of -1) (#9128, #8474).