Closed ferrybig closed 6 years ago
There seems to be a workaround which I tried to explain in the comment section in your question. Below is the recording.
When using magic editor I used Option + Delete to remove selected content. In windows it could be Alt + Backspace/Delete
On Windows I can duplicate this using Backspace. A (Windows) workaround is to just use the Delete key instead.
Notes: Our Magic™Editor fork gets the code for this functionality from Better handling of indentation and the TAB key when editing posts. Unfortunately, the repository for that project appears to be unmaintained (last update 2012-03-27). However, the owner did interact with a pull request on 2016-03-17. The owner is still around (i.e. active on Stack Exchange & an SO employee). There are three pull requests pending, including one from 2015 that addresses this issue (or at least something quite close). The repository is hosted on bitbucket.org, which does not support filing issues.
The other PR which we might be interested in incorporating would not be compatible with IE (if that's something we are attempting to maintain), but could be easily changed to be compatible with IE.
The most recent PR on that project only affects things specific to that project being a separate userscript.
Balpha's script intended to treat backspace as a tab alignment, when the line began with just whitespace. However, it didn't specifically handle selections properly. I think it's best if we go with native behavior for backspace when there is a selection, otherwise preserving the tab alignment behavior.
Based on my deleted MSO question: https://meta.stackoverflow.com/questions/358761/cannot-use-backspace-to-delete-whitespace-part-of-a-code-block-if-it-is-selected
After discussing in the comments on Meta SO, it seemed like this bug was caused by something inside the Magic Editor