Attach (recommended) or Link to PDF file [here:] Can't see how to attach a pdf here, but it is simple to create. Add a form object textbox to a pdf and make sure the option for "Multiline" is true.

Steps to reproduce the problem:
1.  Open a document with a Textbox that is set to Multiline.
2. Attempt to hit the Enter key to go to a new line.

What is the expected behavior? The cursor goes to a new line.

What went wrong? It does not go to a new line.

Link to a viewer: It can be reproduced on mozilla.github.io/pdf.js

I corrected the issue by altering the pdf.js file like this
element.addEventListener("keydown", event => { 
[...]
--} else if (event.key === "Enter") {
++ } else if (event.key === "Enter" && !this.data.multiLine) {

Our initial testing is coming through clean, and hopefully something like this code can be committed to the project in the future.

this.container.className = "textAnnotation";
    const image = document.createElement("img");
    image.src =
      this.imageResourcesPath +
      "annotation-" +
      this.data.name.toLowerCase() +
      ".svg";
    image.alt = "[{{type}} Annotation]";
    image.dataset.l10nId = "text_annotation_type";
    image.dataset.l10nArgs = JSON.stringify({ type: this.data.name });
    if (!this.data.hasPopup) {
      this._createPopup(image, this.data);
    }
    this.container.append(image);
    return this.container;
  }
}
class WidgetAnnotationElement extends AnnotationElement {
  render() {
    
    if (this.data.alternativeText) {
      this.container.title = this.data.alternativeText;
    }
    return this.container;
  }
  _getKeyModifier(event) {
    const { isWin, isMac } = AnnotationElement.platform;
    return (isWin && event.ctrlKey) || (isMac && event.metaKey);
  }
  _setEventListener(element, baseName, eventName, valueGetter) {