diff options
Diffstat (limited to 'vnext/src/ui/MessageInput.js')
-rw-r--r-- | vnext/src/ui/MessageInput.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/ui/MessageInput.js b/vnext/src/ui/MessageInput.js index e19136d4..e20d5100 100644 --- a/vnext/src/ui/MessageInput.js +++ b/vnext/src/ui/MessageInput.js @@ -13,8 +13,10 @@ import UploadButton from './UploadButton'; function moveCaretToEnd(el) { if (typeof el.selectionStart == 'number') { el.selectionStart = el.selectionEnd = el.value.length; + // @ts-ignore } else if (typeof el.createTextRange != 'undefined') { el.focus(); + // @ts-ignore var range = el.createTextRange(); range.collapse(false); range.select(); @@ -24,9 +26,9 @@ function moveCaretToEnd(el) { /** * @typedef {Object} MessageInputProps * @property {string} text - * @property {import('../api').Message} data + * @property {import('../api').Message=} data * @property {function} onSend - * @property {number} rows + * @property {number=} rows * @property {string} children */ |