EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
use setRangeText
Yuri Kuznetsov86f3801513aa
diff --git a/client/src/views/fields/text.js b/client/src/views/fields/text.jsindex 14cc6f2fa3..dc6b117850 100644--- a/client/src/views/fields/text.js+++ b/client/src/views/fields/text.js@@ -644,8 +644,7 @@ class TextFieldView extends BaseFieldView {// Prevent unwanted scroll applied by the browser on enter.event.preventDefault();- target.value = before + "\n" + after;- target.selectionStart = target.selectionEnd = before.length + 1;+ target.setRangeText('\n', selectionStart, selectionEnd, 'end');this.controlTextareaHeight();