geojson.io icon indicating copy to clipboard operation
geojson.io copied to clipboard

CTRL+Z deletes entire JSON if done after importing file

Open fedderw opened this issue 3 years ago • 1 comments

For example, if I drag geojson onto my map, and realize it's the wrong one, hitting CTRL+Z doesn't undo that step, it shows this image

Also, if you edit line placement you can't undo either

fedderw avatar Oct 28 '22 04:10 fedderw

The Cmd-Z/Ctrl-Z functionality is part of Codemirror, the library that handles the code editor. It thinks the last action was to paste in a whole bunch of JSON, overwriting whatever was there before, so Cmd-Z seems to be resetting it.

It may be possible to intercept this keypress, but I'm not sure how it should be handled. ( When I tried it just now the code editor shows the same as yours but the data stays on the map.

Also, if you edit line placement you can't undo either

Can you elaborate on this second point, I'm not sure what you're referring to.

chriswhong avatar Oct 28 '22 22:10 chriswhong