Newlines lost in .innerHTML serialization of <pre> when first character is a newline

Issue #7127291 • Assigned to Travis L.


Simon P.
Apr 6, 2016
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
  • Chrome
  • Safari
  • Firefox
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

The HTML spec says

If current node is a pre, textarea, or listing element, and the first child node of the element, if any, is a Text node whose character data has as its first character a U+000A LINE FEED (LF) character, then append a U+000A LINE FEED (LF) character.
This is because otherwise it doesn’t round-trip correctly if the data starts with a LF.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Ibrahim O.”

      Changed Assigned To to “Travis L.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in