firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.21k stars 198 forks source link

Clicking on the right arrow in the Quick Reference caused me to lose my regex! #2046

Closed eggbean closed 1 year ago

eggbean commented 1 year ago

This is not a bug as such, but a usability problem that has really annoyed me:

I was building a pretty complicated regex pattern when I clicked the right arrow icon in one of the entries under Quick Reference on the bottom right pane (these arrow icons become visible after clicking on the the entries). This made everything I had typed in the central panes to disappear and even what I thought has a saved version of my work was replaced too. This isn't what I expected to happen!

working-name commented 1 year ago

@eggbean have you tried Undo? I don't know how long the undo history is, I don't remember bumping into that when I played around with CodeMirror but it surely can handle a few steps. This is assuming you didn't navigate away from the page or reload the tab.

Also, the saved version cannot be overwritten, at least not to my knowledge. You'll always get an incremented version of the regex if you hit update. If you hit save, you'll get another stem instead, so look in your browser history for the prior stem if that happened.

stem: regex101.com/r/TttZNL/1

firasdib commented 1 year ago

This is intended behavior and not a bug; the tooltip says it will load it into the editor. Either way, you can just press ctrl+z and undo it, and you'll get your data back. Just focus each input before you do it.

eggbean commented 1 year ago

I did try ctrl-z to undo, which I have used in the lower central pane before, but I couldn't retrieve it. I'll be more careful from now.

Great tool though, cheers.