MozillaZine

Firefox inserting extra blank line between paragraphs

Discussion of bugs in Mozilla Firefox
DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 26th, 2018, 5:38 pm

This has started happening recently, in at least two different forums that I frequent regularly: (a) AVS Forum, and (b) Seven Forums, which I believe both use different forum software products. I am currently using Firefox 60.0.1 on Win7 Pro x64 but I believe this symtom had appeared at least one Firefox version prior but I can't be sure. For sure it's occurring right now with 60.0.1.

My composition style (as just used here) is to insert a single blank line between paragraphs, by using the ENTER key (i.e. NL) twice at the end of the last sentence of one paragraph. Then I start typing the characters of the next paragraph. This has always inserted just a single blank line between the two paragraphs when the resulting posted composition is viewed.

Well, recently there is an EXTRA BLANK LINE now visible between the two paragraphs! While I'm typing (e.g. right now, as I'm composing this post) there is only a single blank line between paragraphs, exactly as I'd like. But after I do the SUBMIT to complete the posting, the resulting actual post now viewed shows TWO BLANK LINES between paragraphs.

Here is one example that I just posted on Seven Forums.

And here is a second example that I just posted on AVS Forum.

When I SUBMIT this post right now, I will see if the double-blank-line symptom occurs here in this forum as well, which would certainly point to Firefox itself being the culprit.
Last edited by DSperber on May 26th, 2018, 5:42 pm, edited 1 time in total.

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 26th, 2018, 5:42 pm

Looks like my post here on MozillaZine did NOT produce the double-blank-line symptom. This forum is using different software than both AVS Forum and Seven Forums.

So it looks like it's somehow connected to Firefox and the particular forum software being used.

Brummelchen
 
Posts: 3846
Joined: March 19th, 2005, 10:51 am

Post Posted May 27th, 2018, 12:37 am

cant be firefox, because its <break>
Code: Select all
This subject has been discussed on the Internet before, and even in this forum.  Seems like it just can't be done, but I'll give it one more try.<br />
<br />
<br />
I would like to send FLAC files from Win7 to a network player capable of playing FLAC (e.g. Oppo 103/203). The optimal approach would be to right-click on either a folder containing the music files to be sent (which could include MP3, FLAC, videos, etc.) or an individual FLAC file, and then select the &quot;play-to&quot; item which hopefully would appear on the context menu, and then select the Oppo player from the list presented.<br />
<br />
<br />

BR means line break, that is NOT paragraph <p>

try to reproduce|verify with another browser.

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 27th, 2018, 5:10 am

I have experimented by using IE, and the symptom does NOT occur. Again, points to Firefox as the culprit.

My reference to "paragraph" isn't meant to describe a formal physical <p> as would be the case in Word. I am only describing logically what appears to be paragraphs, meaning one or more consecutive sentences one right after the other, and then what appears as a single blank line, and then the next "paragraph" which is again a series of one or more consecutive sentences.

But your expose of my actual posted text in the other forum definitely shows THREE occurrences of <br />, whereas in fact I only pressed the ENTER key (i.e. NL) TWO TIMES, not three. The fact that there are THREE of those strings in my posted text is exactly why there are TWO blank lines between the paragraphs. I only pressed ENTER two times, so there should only have been TWO occurrences of <br />, which would have resulted in just ONE blank line between the two paragraphs.

My point is that Firefox somehow inserted the extra third <br />. It was not me. I only pressed ENTER twice. This is exactly the bug... that Firefox is adding an extra third <br /> even though I've only hit ENTER twice. If instead I only press ENTER once, then only one <br /> is inserted , i.e. no blank line at all but simply my next keystrokes go at the start of the next physical line. But if I press ENTER twice, which should result in two <br /> and thus one blank line before the next text, instead there are THREE <br /> inserted, resulting in that extra blank line I didn't intend.

But to your question, per my own testing it does NOT happen with IE. And others have reported that it does NOT happen with Chrome. It only happens with Firefox... and this is a recent development, hence my belief it's something coming from a recent change to Firefox.

Furthermore, I can point to other identical examples (say in AVS Forum) of the identical symptom only recently from other posters, no doubt also using Firefox.

One more point... I can EDIT the flawed post (with the three <br /> strings, and delete one of them, and then SAVE the edited post. And now there are only two <br /> strings and thus only one blank line just as I originally intended. So I can fix the flawed result of the extra string inserted improperly by Firefox. But if I actually do add some text at the end, thus creating another new paragraph at the end, or if I insert a new "paragraph" in the middle of my post, either of which is again represented by pressing ENTER two times, well now this new "paragraph" situation once again shows an extra blank line. So once again it's clear that when ENTER is pressed two consecutive times (either originally or in an EDIT), this results in three <br /> strings inserted into the text instead of the two which should be inserted.

Brummelchen
 
Posts: 3846
Joined: March 19th, 2005, 10:51 am

Post Posted May 27th, 2018, 6:34 am

firefox wont do that. try safe-mode or a fresh profile.
could also be possible that a site script is causing this -> ask web-admin.

Lnwdz
 
Posts: 166
Joined: June 12th, 2012, 7:59 am

Post Posted May 28th, 2018, 1:43 am

Another report on another forum -
https://forums.radioreference.com/forum ... acing.html

The common factors seem to be Firefox 60 and vBulletin 3.8.x forum software.
(I don't have Firefox 60 for testing.)

This might be the relevant Firefox change:
https://www.fxsitecompat.com/en-CA/docs ... ead-of-br/

I'm guessing that the old forum software expects different behaviors by Firefox and Chrome, but now they act about the same. Or maybe it is a Firefox bug.

You might be able to test the theory by posting to AVS after toggling this pref:
editor.use_div_for_default_newlines

Brummelchen
 
Posts: 3846
Joined: March 19th, 2005, 10:51 am

Post Posted May 28th, 2018, 6:10 am

i dont saw any div there, so i assume a site script changing it

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 6:47 am

Lnwdz wrote:This might be the relevant Firefox change:
https://www.fxsitecompat.com/en-CA/docs ... ead-of-br/

I'm guessing that the old forum software expects different behaviors by Firefox and Chrome, but now they act about the same. Or maybe it is a Firefox bug.

You might be able to test the theory by posting to AVS after toggling this pref:
editor.use_div_for_default_newlines
Genius! You are a gentleman and a scholar!

Toggling that about:config preference indeed reverted the posting behavior back to the way it should work, i.e. with once again only a single blank line between paragraphs when pressing the ENTER key twice. It had been suggested in the AVS Forum thread that clicking on the "Editor's command mode" when composing a post would also prevent the extra blank line. I suspect this is a one-time manual way to accomplish the same thing that toggling the editor about:config preference does permanently.

Many thanks. I've posted this finding over on the "forum operations" thread in AVS Forum where I reported this to them.

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 7:14 am

But I do think that this Firefox change in 60.0 is really going to impact LOTS of forums (which use vBulletin), and the millions of Firefox users who post on those forums.

It would be easier for vBulletin to make the change they now need to make, to support two different Firefox behaviors depending on whether it's 60.0 or newer, or older. But by inserting the about:config preference toggle option, I don't see how they can decide how they need to behave... either the before or after way... since now it's not just the Firefox version which implies the behavior, it's the preference setting as well.

This seemingly minor change has global effect, it appears.

therube

User avatar
 
Posts: 19161
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted May 28th, 2018, 8:18 am

Some forums strip multiple NL - regardless of browser.

dslreports.com, https://www.dslreports.com/forum/sware does that.
(And I have to suspect the webmaster has the option to enforce that or not.)


So if you type:
=======
this is a test



this is only a test
=======

You end up with:
=======
this is a test

this is only a test
=======


This forum does not.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 10:02 am

Turns out a forum admin at AVS Forum looking into this was unable to duplicate the symptom himself, and yet he is using Firefox 60.0.1 and still has the "editor" preference set to default of TRUE (which should have triggered the errant behavior for him).

However he is running Win10, whereas I'm running Win7. And he didn't see the behavior whereas I (and others also running Win7) do. So this seems like a further data point (i.e. "clue") as to exactly what the problem is and how/where to fix it (either in Firefox or in vBulletin) to prevent the extra blank line from getting mistakenly generated.

I have a Win10 laptop I'm going to run my own test on, to see if I confirm the relevance of Win7 vs. Win10 as producing different results with the same Firefox 60.0.1.

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 11:11 am

Well, for me, it fails (i.e. adds an extra blank line) no matter whether I use Win7 or Win10. So now I still don't know why it's not failing for the AVS Forum admin using Win10 and Firefox 60.0.1.

But I do have a question, because I really don't understand the HTML. When the value of the "editor.use_div_for_default_newlines" preference is TRUE, there are THREE <br /> sequences inserted when I press ENTER only TWO times. There is no <div> or </div> or similar. Is the meaning of this preference intended to suggest that some other string is used to represent the multiple newlines instead of <br />? Is this the expected behavior when TRUE?

The only difference when changing the preference value to FALSE is that there are now TWO <br /> sequences resulting from the TWO uses of the ENTER key, instead of the THREE sequences when TRUE. Is that the actual intended result from changing the preference, i.e. is it the expected Firefox behavior when FALSE?

To be specific, when TRUE the posted source looks as follows:

Code: Select all
   <!-- message -->
      <div id="post_message_56255160" itemprop="text">
         
         Let's see if it's related to &quot;quick reply&quot;.<br />
<br />
<br />
One blank line above.<br />
<br />
<br />
 One more blank line above.<br />
<br />
<br />
Edit: nope, doesn't matter.  Regular reply or quick reply, same bug.
      </div>
      <!-- / message -->


And when FALSE, the posted source code looks as follows:

Code: Select all
   <!-- message -->
      <div id="post_message_56255182" itemprop="text">
         
         After changing editor preference to FALSE, let's see what happens.<br />
<br />
Single blank line above.<br />
<br />
One more single blank line.
      </div>
      <!-- / message -->


Is the above proof that both exhibited behaviors are exactly what is expected from the TRUE and FALSE toggled values?

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 11:18 am

And what is the significance of the following:

But, what about this on the Firefox Site Compatibility page?:

// To insert <br> as before:

document.execCommand("DefaultParagraphSeparator", false, "br");

// To generate <p> instead:

document.execCommand("DefaultParagraphSeparator", false, "p");

DSperber
 
Posts: 63
Joined: September 30th, 2012, 1:52 pm

Post Posted May 28th, 2018, 5:31 pm

I have been on forums where a single ENTER (i.e. new line) key apparently generated the effect you describe for "new paragraph" (I guess <p>), in that all I had to do was type ENTER once and the resulting post produced a line break and then a blank line. Visibly there was one blank line between the two paragraphs. And I, not knowing this was going to be the case beforehand, just went ahead and typed ENTER two times in my customary way, thus resulting in a second blank line (not another line break and blank line, which it seems to me would have generated another two visible blank lines). This is a while back, so I must have been using a Firefox version prior to 60.0.1.

So perhaps the forum software itself interceded and handled the first ENTER key specially (inserting just <p>), and then the second ENTER key was handled "normally" (i.e. it produced the normal expected <br />). I don't know for sure, but I do recall that after typing this and hitting SUBMIT, that I was surprised at the unexpected two blank lines I saw. So I then had to EDIT and remove the unwanted second blank line, leaving just the first single ENTER with its apparent <p> effect which produced what I wanted which was a single blank line between paragraphs.

I am now of the opinion that the comments present on the Firefox Compatibility Site page are the correct ones, and that it was THIS design change which was intended with Firefox 60.0.1... i.e. to define exactly what string or effect was to be produced when ENTER (i.e. new line) was pressed. And if you look down at the bottom of that page, there are four REFERENCES which present four discussions about the potential enormous impact of making this very change.

I am now of the opinion that the "Switch Editor Mode" button in the right-upper corner above the composition window on AVS Forum is actually the forum implementation of the discussed command toggling of the "DefaultParagraphSeparator" value, accomplishing the use of "br" vs. "p" corresponding to ENTER. This is apparently one built-in new method way to on-demand one-off bring back the old ENTER behavior for the current composition.

But I think the insertion of an extra <br /> when two ENTER keys are pressed in succession (i.e. resulting in three of these strings instead of just two) was actually an unintended result of the 60.0.1 code change which was really supposed to be substituting <p> for ENTER, instead of <br />. And apparently the editor.use_div setting corrects this "coding mistake" and results in straightforward old behavior of a single <br /> from each ENTER, also thus making use of the "Switch Editor Mode" button unnecessary. It doesn't force <p> but at least it does eliminate the extra <br />, effectively backing out the 60.0.1 flawed coding change.

I think this is really screwed up, and as was expressed in one of the discussions:

"I think this is a very risky change. While some editor widgets may
already be UA sniffing Gecko and using the defaultParagraphSeparator
command already, others may be relying on us injecting a <br> by default
and be fixing up the DOM after the fact, and those widgets could
potentially break in all kinds of potentially surprising ways as a
result of this change. "

I will simply operate each of my Firefox setups with changing the editor.use_div setting to FALSE, thus apparently backing out the effect of their change and making Firefox work the way it always used to... at least when posting on vBulletin forum software sites. But honestly, this is not working correctly as delivered in 60.0.1.

mgagnonlv
 
Posts: 711
Joined: February 12th, 2005, 8:33 pm

Post Posted September 19th, 2018, 6:28 am

Glad there is a solution.

I am rather ambivalent on the subject. On one hand, I much prefer to get fully separated paragraphs when I press Enter once. But I wish those paragraphs were separated with <p> </p>. Having <div> inserted means the code of the page is even more stupid and makes page rendering longer.
Michel Gagnon
Montréal (Québec, Canada)

Return to Firefox Bugs


Who is online

Users browsing this forum: No registered users and 2 guests