When going out of the VisualEditor (either by clicking elsewhere or by hitting escape) the AbandonEditDialog offers two options: "Cancel" and "Discard edits". The "Discard edits" option is focused by default and so the user only has to hit Enter or Space to confirm that they want their edits discarded.
Far too often this results in edits accidentally being discarded, with no way of recovering them as VisualEditor's AutoSave is cleared when edits are discarded.
Two hypothetical situations where one will encounter this problem:
- You are writing an article with VisualEditor and you are changing the target of a link or changing a citation. You decide not to change it after all so you click Escape. Unaware that you held the Escape button a few milliseconds to long or accidentally double clicked it (causing a AbandonEditDialog to fire), you continue writing. Words are short, you don't notice you havent exited the AbandonEditDialog, and you hit the Space bar. Poof, your work is gone and no way of retrieving it.
- You are writing an article with VisualEditor and you somehow click out of it. The AbandonEditDialog pops up and you, having used Apple computers for decades, know intuitively that the "Yes" button will be activated with Enter and the "Cancel" button will be activated with Space. You click Space without giving it much thought, and your edits are discarded.
Expected results:
Clicking Space should not cause edits to be discarded.
Is this really necessary to change?
Yes, I have lost many a large edit to this unexpected behaviour, and I assume this may be the cause of many editors at the Wikipedia Help Desk coming and asking "I don't know what I clicked in the VisualEditor but my work is gone".