EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
text field: prevent scroll chrome woe with other solution
Yuri Kuznetsovc398ab0a4029
diff --git a/client/src/views/fields/text.js b/client/src/views/fields/text.jsindex dc6b117850..b8a1168a46 100644--- a/client/src/views/fields/text.js+++ b/client/src/views/fields/text.js@@ -642,9 +642,8 @@ class TextFieldView extends BaseFieldView {if (!match) {// Prevent unwanted scroll applied by the browser on enter.- event.preventDefault();-- target.setRangeText('\n', selectionStart, selectionEnd, 'end');+ const previousWindowScroll = window.scrollY;+ setTimeout(() => window.scrollTo({top: previousWindowScroll}), 0);this.controlTextareaHeight();