Fix infinite loop when @mentioning in a discussion composer

This commit is contained in:
Toby Zerner 2015-06-19 15:48:51 +09:30
parent 473963087b
commit 004e8919b6

View File

@ -54,8 +54,8 @@ export default class DiscussionComposer extends ComposerBody {
return items;
}
onload(element) {
super.onload(element);
onload(element, isInitialized, context) {
super.onload(element, isInitialized, context);
this.editor.$('textarea').keydown((e) => {
if (e.which === 8 && e.target.selectionStart == 0 && e.target.selectionEnd == 0) { // Backspace