mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Make undoing a cloze operation behave more intuitively
Prior to this change, undoing the clozeing of a block of text would delete the text altogether. We'd prefer it to revert to unclozed text.
This commit is contained in:
parent
a87e55e977
commit
50e6fade55
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ function wrap(front, back) {
|
|||
setFormat('removeFormat', null, true);
|
||||
var s = window.getSelection();
|
||||
var r = s.getRangeAt(0);
|
||||
var content = r.extractContents();
|
||||
var content = r.cloneContents();
|
||||
var span = document.createElement("span")
|
||||
span.appendChild(content);
|
||||
s.removeAllRanges();
|
||||
|
|
Loading…
Reference in a new issue