问HN:有人能解释一下新Reddit的“撤销”功能在桌面端是如何运作的吗?

1作者: GWBullshit大约 6 小时前原帖
在去年强制推出的新“新Reddit”中,帖子编辑模式发生了许多(不幸的)变化;其中之一是,如果你有多张图片和它们之间的额外空格,删除其中一个额外的空格有时会意外地删除上方的图片,即使在图片之间有四个空格,而你只删除了最底下的一个。或者,有时如果空格位于文本和图片之间,删除的那一行上方的任何文本也会被删除。 这里有个奇怪的地方(至少对我来说是):我意外地发现,如果你在桌面菜单中选择“撤销”……大约7到10次,它实际上会在Reddit的编辑模式中“撤销”删除,并重新发布任何丢失的图片或文本。 这怎么可能呢?也就是说,桌面操作系统的功能在网站编辑时是如何工作的?
查看原文
In the new &quot;New Reddit&quot; 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.<p>Here&#x27;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 &quot;Undo&quot; ... about 7&#x2F;10 times it actually &quot;undoes&quot; the deletion within Reddit&#x27;s edit mode and reposts any images&#x2F;text lost.<p>How is this possible, ie, how do desktop OS functions work while editing in a website?