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.

*
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import {
  AnnotationBorderStyleType,
  AnnotationType,
  assert,
  LINE_FACTOR,
  shadow,
  unreachable,
  Util,
  warn,
} from "../shared/util.js";
import {
  AnnotationPrefix,
  DOMSVGFactory,
  getFilenameFromUrl,
  PDFDateString,
} from "./display_utils.js";
import { AnnotationStorage } from "./annotation_storage.js";
import { ColorConverters } from "../shared/scripting_utils.js";
import { XfaLayer } from "./xfa_layer.js";
const DEFAULT_TAB_INDEX = 1000;
const DEFAULT_FONT_SIZE = 9;
const GetElementsByNameSet = new WeakSet();
function getRectDims(rect) {