mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-08-22 02:51:35 -05:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user