Don't clear textarea on escape, unless we're correcting a message
This commit is contained in:
parent
7409668a5d
commit
c42bd90c9d
|
@ -85,13 +85,13 @@ export default class MessageForm extends ElementView {
|
|||
}
|
||||
|
||||
onEscapePressed (ev) {
|
||||
ev.preventDefault();
|
||||
const idx = this.model.messages.findLastIndex('correcting');
|
||||
const message = idx >= 0 ? this.model.messages.at(idx) : null;
|
||||
if (message) {
|
||||
ev.preventDefault();
|
||||
message.save('correcting', false);
|
||||
this.insertIntoTextArea('', true, false);
|
||||
}
|
||||
this.insertIntoTextArea('', true, false);
|
||||
}
|
||||
|
||||
onPaste (ev) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user