Disable escape key on rich text fields - fixes #2998

pull/2982/merge
Matt Westcott 2016-09-16 15:19:12 +01:00
rodzic 8aa316c575
commit c6666c6de5
3 zmienionych plików z 3 dodań i 11 usunięć

Wyświetl plik

@ -19,6 +19,7 @@ Changelog
* Fix: Image rendition / document file deletion now happens on a post_delete signal, so that files are not lost if the deletion does not proceed (Janneke Janssen)
* Fix: "Your recent edits" list on dashboard no longer leaves out pages that another user has subsequently edited (Michael Cordover, Kees Hink, João Luiz Lorencetti)
* Fix: `InlinePanel` now accepts a `classname` parameter as per the documentation (emg36, Matt Westcott)
* Fix: Disabled use of escape key to revert content of rich text fields, which could cause accidental data loss (Matt Westcott)
1.6.2 (02.09.2016)

Wyświetl plik

@ -54,6 +54,7 @@ Bug fixes
* Image rendition / document file deletion now happens on a post_delete signal, so that files are not lost if the deletion does not proceed (Janneke Janssen)
* "Your recent edits" list on dashboard no longer leaves out pages that another user has subsequently edited (Michael Cordover, Kees Hink, João Luiz Lorencetti)
* ``InlinePanel`` now accepts a ``classname`` parameter as per the documentation (emg36, Matt Westcott)
* Disabled use of escape key to revert content of rich text fields, which could cause accidental data loss (Matt Westcott)
Upgrade considerations

Wyświetl plik

@ -307,18 +307,8 @@
}
},
_keys: function(event) {
var old, widget;
var widget;
widget = event.data;
if (event.keyCode === 27) {
old = widget.getContents();
widget.restoreOriginalContent(event);
widget._trigger("restored", null, {
editable: widget,
content: widget.getContents(),
thrown: old
});
return widget.turnOff();
}
},
_rangesEqual: function(r1, r2) {
if (r1.startContainer !== r2.startContainer) {