Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14814 closed Bug (fixed)

Using Firefox Nightly and switching between source / normal mode adds a newline to <pre> blocks

Reported by: SphinxK Owned by:
Priority: Normal Milestone:
Component: UI : Source View Version: 4.5.11
Keywords: Cc:

Description (last modified by Jakub Ś)

Steps to reproduce

  1. Use http://nightly.ckeditor.com to type some text
  2. Switch to source mode and add <pre>foo bar</pre>
  3. Switch back to visual mode
  4. Switch again between source and visual mode

Expected result

No side effects from switching between modes

Actual result

A newline is added right after the opening <pre ...> tag, each switch adds another newline.

Other details (browser, OS, CKEditor version, installed plugins)

I reproduce this with Firefox Nightly only and on MDN (e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Map/set$edit ).

I'm sorry I cannot go further analyzing the issue with my knowledge.

Change History (7)

comment:1 Changed 3 years ago by Jakub Ś

I haven't been able to reproduce this in st.able FireFox 48.0.1 in my loacal CKEditor as well as ten one on MDN - both are 4.5.10

comment:2 Changed 3 years ago by Jakub Ś

Description: modified (diff)

I confirm this issue for Firefox nightly. You just insert <pre>foo bar</pre>, switch modes and spaces get added.

We could check whether this is CKEditor or Firefox issue.

comment:3 Changed 3 years ago by Tade0

On Firefox 48.0 I'm getting only one superfluous newline.

The problem seems to appear here: https://github.com/ckeditor/ckeditor-dev/blob/2f98a2015c50b899e284b8ab30f5013fdfa4d134/core/htmldataprocessor.js#L193

Something must be up with how that writer writes the HTML data.

comment:4 Changed 3 years ago by Jakub Ś

Issue is still there in Nightly 51.0a1(2016-09-08) but not yet in stable 48.0.2

comment:5 Changed 3 years ago by SphinxK

After doing regression tests, this is related to https://bugzilla.mozilla.org/show_bug.cgi?id=838954 I hope this will help :)

comment:6 Changed 3 years ago by SphinxK

Resolution: fixed
Status: newclosed

Since https://bugzilla.mozilla.org/show_bug.cgi?id=838954 changes were back out for now, the issue is fixed with the current Nightly.

comment:7 Changed 3 years ago by Piotrek Koszuliński

Thanks for letting us know. We're also monitoring the HTML spec for this change. It's always a pity when a change (I guess – for good) is blocked by existing solutions. We'd like to avoid changing CKEditor, because our users wouldn't be happy (they'd be forced to upgrade), but we'd react of course.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy