This is the code I use to prevent that while also allowing us to use the Enter key to insert new lines while inside of a Multiline Text Control:
NWF$(window).on("keydown", function (event) {
var target = (event.target || event.srcElement);
if (event.keyCode === 13) {
event.preventDefault();
if (target.nodeName.toLowerCase() === "textarea") {
var textValue = target.value;
var textBeforeSplit = textValue.slice(0, target.selectionStart);
var textAfterSplit = textValue.slice(target.selectionEnd, textValue.length);
var resultingText = textBeforeSplit + "\n" + textAfterSplit;
target.value = resultingText;
target.selectionStart = target.textLength - textAfterSplit.length;
target.selectionEnd = target.selectionStart;
}
}
});
Just throw that into the custom JS on a classic form and let me know if it works for ya