Commit 22e3c496 authored by JC Brand's avatar JC Brand

Terminology fix

parent e1762a1b
......@@ -1102,7 +1102,7 @@ converse.plugins.add('converse-chatview', {
textarea.value = '';
textarea.value = existing+value+' ';
}
u.putCurserAtEnd(textarea);
u.placeCaretAtEnd(textarea);
},
createEmojiPicker () {
......
......@@ -348,11 +348,11 @@ u.getCurrentWord = function (input, index) {
};
u.replaceCurrentWord = function (input, new_value) {
const cursor = input.selectionEnd || undefined,
current_word = _.last(input.value.slice(0, cursor).split(' ')),
const caret = input.selectionEnd || undefined,
current_word = _.last(input.value.slice(0, caret).split(' ')),
value = input.value;
input.value = value.slice(0, cursor - current_word.length) + `${new_value} ` + value.slice(cursor);
input.selectionEnd = cursor - current_word.length + new_value.length + 1;
input.value = value.slice(0, caret - current_word.length) + `${new_value} ` + value.slice(caret);
input.selectionEnd = caret - current_word.length + new_value.length + 1;
};
u.triggerEvent = function (el, name, type="Event", bubbles=true, cancelable=true) {
......@@ -433,7 +433,7 @@ u.getRandomInt = function (max) {
return Math.floor(Math.random() * Math.floor(max));
};
u.putCurserAtEnd = function (textarea) {
u.placeCaretAtEnd = function (textarea) {
if (textarea !== document.activeElement) {
textarea.focus();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment