Open Bug 1298745 Opened 8 years ago Updated 3 years ago

Line break at no-break space (NBSP)

Categories

(Core :: DOM: Editor, defect, P5)

45 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160823121617

Steps to reproduce:

Type a new message with a no-break space somewhere around the end of a visual line. You may need to change your keyboard layout to be able to produce that character (U+00A0). I do with my custom keyboard layout, available at http://u10d.de/de-eu, then press AltGr+Space.


Actual results:

Something that looks like a space was inserted at the correct position, but it wraps the line. It does so in both the message editor and the message view (in my Sent folder).


Expected results:

No-break spaces should not break. Ever.
Can you try this in Firefox only at:
http://www-archive.mozilla.org/editor/midasdemo/
Same issue there. Latest stable Firefox on Windows 10.

Space (SP) (U+0020) breaks the line. PASS
No-break space (NBSP) (U+00A0) breaks the line. FAIL
Narrow no-break space (NNBSP) (U+202F) does not break the line. PASS

Input characters verified by typing into BabelPad and reading the Unicode code point of the typed character.

Since the HTML entity   usually does not break the line, I suspect that the NBSP is translated into an SP by the keyboard input handling.
Component: Untriaged → Editor
Product: Thunderbird → Core
If it can be reproduced in FF, and most/all editor problems can be if you try hard enough, then this goes to Core::Editor and the FF team looks into it. Funny that there is a difference between NNBSP and NBSP, so it might be a small fix (just dreaming without having looked into it at all).
More info: Pasting these space characters has the exact same effect as typing them. I typed them into BabelPad and could see the codepoint there. Then I copied each space and pasted it into the editor from the link above. NBSP breaks, NNBSP doesn't. Maybe NBSP is just ignored in editors but not in other content.

There is a difference between typing and pasting in other applications. I can't type these space characters into Visual Studio 2015, but I can type them elsewhere and then copy and paste. That's why I've tested this here as well. But it seems to be consistent in Firefox.

PS: As I'm writing this, Thunderbird notifies me about an update. Have you already fixed this so quickly? ;)
Priority: -- → P3

Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.