diff --git a/src/view/domconverter.js b/src/view/domconverter.js index 40141e0d1..66505be86 100644 --- a/src/view/domconverter.js +++ b/src/view/domconverter.js @@ -921,6 +921,13 @@ export default class DomConverter { // 2. Replace the last space with nbsp if there are two spaces at the end or if the next node starts with space or there is no // next node (container element boundary). + // + // Keep in mind that Firefox prefers $nbsp; before tag, not inside it: + // + // Foo  bar <-- bad. + // Foo  bar <-- good. + // + // More here: https://github.com/ckeditor/ckeditor5-engine/issues/1747. if ( data.charAt( data.length - 1 ) == ' ' ) { const nextNode = this._getTouchingViewTextNode( node, true );