News for hackers. Stuff that matters.

Ask HN: Can someone explain how new Reddit's "undo" works as a desktop feature

In the new "New Reddit" force-unloaded last year, there have been many (unfortunate) changes to post edit mode; one of them is that if you have several images and extra spaces between them, deleting even one such extra space sometimes inadvertently deletes the image above such spaces, even if there were, say, 4 spaces between images and you only deleted the bottom-most. Or sometimes it will delete any text above the line you just deleted if the spaces were between text and an image.

Here's the weird part (or at least for me it is): I inadvertently discovered by mistake that if you go to your DESKTOP menu and select "Undo" ... about 7/10 times it actually "undoes" the deletion within Reddit's edit mode and reposts any images/text lost.

How is this possible, ie, how do desktop OS functions work while editing in a website?

( 5 comments | on HN )
Re:Ask HN: Can someone explain how new Reddit's "undo" works... by bigyabai on Saturday May 17, 2025 @06:42PM (#44017571)
Your desktop menu is an imperfect idiom representing browser functions by proxy. The behavior has always been easily hijacked, there is no real native support for these menu functions in the web.
Re:Ask HN: Can someone explain how new Reddit's "undo" works... by GWBullshit on Saturday May 17, 2025 @06:56PM (#44017624)
I see and thank you for your reply; I just have one more question: If you select "desktop interaction", doesn't that by default "unselect" browser ... um ... "selection"?

In other words, when desktop is selected, how does my desktop "know" that of all the other possibly relevant things open (for example, a notes or word processing app), that it's "Oh, you probably wanted to undo what you just typed into your browser while you were on a website in edit mode"??

Is it purely a function of "undo last thing done"?

Having said that, I just noticed that "it's you again".

As a side question, do you have a tab with my submission history perma-opened?

Because I find it odd that you of all people "just happened to stumble across this" 2 minutes after I posted it.

Re:Ask HN: Can someone explain how new Reddit's "undo" works... by ahazred8ta on Saturday May 17, 2025 @07:56PM (#44017900)
Some people have the 'new' page bookmarked, and only read the 'new' feed. No stumbling involved. news.ycombinator.com/newest
Re:Ask HN: Can someone explain how new Reddit's "undo" works... by GWBullshit on Saturday May 17, 2025 @08:33PM (#44018059)
Fair enough.
Re:Ask HN: Can someone explain how new Reddit's "undo" works... by GWBullshit on Saturday May 17, 2025 @07:37PM (#44017805)
Also as a side question, how is it that this works on Reddit but doesn't seem to do likewise on other websites under similar conditions?