Skip to content

Commit a59c898

Browse files
committed
Revert "Fixing posititonal enter in text area. (#1610)"
This reverts commit a4f2f4f.
1 parent a4f2f4f commit a59c898

File tree

1 file changed

+1
-5
lines changed
  • ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/clientlibs/site/js

1 file changed

+1
-5
lines changed

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/clientlibs/site/js/textinputview.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@
8787
// Prevent default action of Enter key to avoid form submission
8888
event.preventDefault();
8989
// Append a newline character to the widget value
90-
let cursorPosition = this.widget.selectionStart;
91-
let textBefore = this.widget.value.substring(0, cursorPosition);
92-
let textAfter = this.widget.value.substring(this.widget.selectionEnd);
93-
this.widget.value = textBefore + '\n' + textAfter;
94-
this.widget.selectionStart = this.widget.selectionEnd = cursorPosition + 1;
90+
this.widget.value = this.widget.value + '\n';
9591
}
9692
});
9793
}

0 commit comments

Comments
 (0)