From 7ae2bd83b71c175e9b14b55807b335551a472709 Mon Sep 17 00:00:00 2001 From: JustOff Date: Tue, 19 Feb 2019 21:15:35 +0200 Subject: [PATCH] Preserve newlines in textarea placeholders --- dom/html/nsTextEditorState.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index 0b4cb19206..25be6016c4 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -2255,7 +2255,11 @@ nsTextEditorState::UpdatePlaceholderText(bool aNotify) nsCOMPtr content = do_QueryInterface(mTextCtrlElement); content->GetAttr(kNameSpaceID_None, nsGkAtoms::placeholder, placeholderValue); - nsContentUtils::RemoveNewlines(placeholderValue); + if (mTextCtrlElement->IsTextArea()) { //