1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 06:57:54 +02:00

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 6a248ea6a6
commit f571a40ca8

View File

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