From 360aefc84df01db4e6b09c7aabff685cbc634b31 Mon Sep 17 00:00:00 2001 From: ksercs Date: Mon, 7 Oct 2024 16:51:15 +0400 Subject: [PATCH] spike if we do nothing if value=initial_value --- .../js/__internal/ui/text_box/m_text_editor.base.ts | 4 ++-- .../tests/DevExpress.ui.widgets.editors/textbox.tests.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts index 054448c779b4..1e204f8a4521 100644 --- a/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts +++ b/packages/devextreme/js/__internal/ui/text_box/m_text_editor.base.ts @@ -920,8 +920,8 @@ const TextEditorBase = Editor.inherit({ _resetToInitialValue() { if (this.option('value') === this._initialValue) { - this._options.silent('text', this._initialValue); - this._renderValue(); + // this._options.silent('text', this._initialValue); + // this._renderValue(); } else { this.callBase(); } diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/textbox.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/textbox.tests.js index c189dec3e772..abdbdbffcc8b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/textbox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/textbox.tests.js @@ -103,7 +103,7 @@ QUnit.module('common', {}, () => { const $input = $(`.${INPUT_CLASS}`); const keyboard = keyboardMock($input); - keyboard.type('123').press('enter'); + keyboard.type('123').change(); assert.strictEqual($input.val(), '123', 'input value is pressent before reset');