Fix crash on browser console when typing "/r " (#1014)

`e.setSelectionRange` is a typo, `setSelectionRange` is a property of the textbox element.

Results in `Uncaught TypeError: e.setSelectionRange is not a function` when the user types in ``"/r "``.
This commit is contained in:
Hidden50
2017-09-29 19:14:54 +02:00
committed by Guangcong Luo
parent 1080ee0b58
commit 1ca77fdde1

View File

@@ -159,7 +159,7 @@
e.stopPropagation();
var val = '/pm ' + app.user.lastPM + ', ';
textbox.value = val;
e.setSelectionRange(val.length, val.length);
textbox.setSelectionRange(val.length, val.length);
}
},
clickUsername: function (e) {