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.

const TEXT_ALIGNMENT = ["left", "center", "right"];
    const { fontColor } = this.data.defaultAppearanceData;
    const fontSize =
      this.data.defaultAppearanceData.fontSize || DEFAULT_FONT_SIZE;
    const style = element.style;
    
    
    
    
    
    
    
    
    let computedFontSize;
    const BORDER_SIZE = 2;
    const roundToOneDecimal = x => Math.round(10 * x) / 10;
    if (this.data.multiLine) {
      const height = Math.abs(
        this.data.rect[3] - this.data.rect[1] - BORDER_SIZE
      );
      const numberOfLines = Math.round(height / (LINE_FACTOR * fontSize)) || 1;
      const lineHeight = height / numberOfLines;
      computedFontSize = Math.min(
        fontSize,
        roundToOneDecimal(lineHeight / LINE_FACTOR)
      );
    } else {
      const height = Math.abs(