Extra line breaks when posting to forums with editor.use_div_for_default_newlines=true

NEW
Unassigned

Status

defect
P2
normal
10 months ago
3 months ago

People

(Reporter: jola, Unassigned)

Tracking

Firefox 61
Dependency tree / graph

Firefox Tracking Flags

(firefox61 affected, firefox62 affected, firefox63 affected)

Details

Reporter

Description

10 months ago
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180807170231

Steps to reproduce:

In recent versions of Firefox posting messages in forums based on vBulletin 3.8 creates extra line-breaks in the posts. I have investigated this and it seems to be related to the changes done recently in Firefox related to the line-breaks and the option editor.use_div_for_default_newlines. I have read about this change on several places in Bugzilla, and it seems to have been done to make Firefox more similar to Chrome. However, when using Chrome I do not get any extra line-breaks when posting messages. And if if toggle editor.use_div_for_default_newlines to False in Firefox it works as it should. I have seen several other large forums where this problem has been noticed. vBulletin 3.8 is still used on many of the largest forums so this is a problem which affects many thousand users. Someone else is discussing the problem here: http://forums.mozillazine.org/viewtopic.php?f=9&t=3040337


Actual results:

When posting messages to a vBulletin 3.8 based forum, like https://www.cfd-online.com/Forums/site-help-feedback-discussions/ pressing enter twice to create a paragraph-break creates three line-breaks instead of two.


Expected results:

Extra line-breaks should not be added in forum posts.
Hello

I can confirm the reproduction of this issue. Posting to that specific forum will reproduce the issue in the case of the Firefox browser, but not the Chrome browser.
Proof: https://www.cfd-online.com/Forums/site-help-feedback-discussions/206113-test.html#post704619

Thank you for your contribution!
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Blocks: 1449564
Component: Layout → Editor

Updated

10 months ago
Blocks: 1430551
No longer blocks: 1449564
Priority: -- → P2

Updated

10 months ago
Summary: Extra line breaks when posting to forums → Extra line breaks when posting to forums with editor.use_div_for_default_newlines=true
Looks like that this is not our bug, this must be a bug of the forum.

When I access the post form with Google Chrome, there is only <textarea> without a button to switch editor to rich text editor. However, when I access it with Firefox Nightly, rich text editor is created by default, and I see a toggle button at top-right corner of the form to switch it to <textarea>. When I switch the editor to <textarea>, <div> elements are converted to <br> elements. I guess that same conversion is used at posting since no posts in the example thread do not have <div> for line breaks. So, this must be the converter's bug which run only with Firefox.
If the forum wants to keep using traditional behavior rather fixing the converter, they should do:

try {
  document.execCommand("defaultparagraphseparator", false, "br");
} catch (e) {
  // ignore exception which does not support "defaultparagraphseparator"
  // command or a non-standardized value, "br"
}
Component: Editor → Desktop
Product: Core → Tech Evangelism
Version: 61 Branch → Firefox 61
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.