Closed Bug 1486513 Opened 7 years ago Closed 4 years ago

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

Categories

(Web Compatibility :: Site Reports, defect, P2)

Firefox 61
defect

Tracking

(firefox61 affected, firefox62 affected, firefox63 affected)

RESOLVED FIXED
Tracking Status
firefox61 --- affected
firefox62 --- affected
firefox63 --- affected

People

(Reporter: jola, Unassigned)

References

Details

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
Blocks: 1430551
No longer blocks: 1449564
Priority: -- → P2
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

This issue seems to be fixed now.
https://prnt.sc/wozhsj
https://prnt.sc/wozimu
https://prnt.sc/wozl7e
https://prnt.sc/wp1i73

Tested with:
Browser / Version: Firefox Nightly 86.0a1 (2021-01-15)
Operating System: Windows 10 Pro

Jonas Larsson can you still reproduce it on your side?

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(jola)
Resolution: --- → FIXED

Hi Oana,

I just tried it with Firefox 84.0.2 (64 bit) (said to be up-to-date) on my Windows 8.1 computer. First I did "about:config" in my Firefox browser and changed back editor.use_div_for_default_newlines to true, which I think is the default. Then I posted a test message here:

https://www.cfd-online.com/Forums/site-help-feedback-discussions/206113-test.html#post793433

As you can see Firefox still gives extra line-breaks with the default setting "editor.use_div_for_default_newlines true", so the problem is still there for vBulletin 3.8 based forums, at least on Firefox 84.0.2 (64-bit). I saw that you had used a more recent development version of Firefox.

Flags: needinfo?(jola)

(In reply to Oana Arbuzov [:oanaarbuzov] from comment #4)
I just tried it with Firefox 84.0.2 (64 bit) (said to be up-to-date) on my Windows 8.1 computer. First I did "about:config" in my Firefox browser and changed back editor.use_div_for_default_newlines to true, which I think is the default. Then I posted a test message here:

https://www.cfd-online.com/Forums/site-help-feedback-discussions/206113-test.html#post793433

As you can see Firefox still gives extra line-breaks with the default setting "editor.use_div_for_default_newlines true", so the problem is still there for vBulletin 3.8 based forums, at least on Firefox 84.0.2 (64-bit). I saw that you had used a more recent development version of Firefox.

I also tried with "editor.use_div_for_default_newlines false", and then it works correctly as you can see here:

https://www.cfd-online.com/Forums/site-help-feedback-discussions/206113-test.html#post793436

You need to log in before you can comment on or make changes to this bug.