HerrSerker HerrSerker - 8 months ago 54
HTML Question

Chrome doesn't respect Zero Width Joiner

If I create a text, where I got a dash at the start of a word (very common in German language), Google Chrome sets the hyphen at the end of the line and the word at the start of the next line. This is the wrong behavior. It should be the hyphen and the word on one line. Even if I put in a

entity between hyphen and word, it still doesn't work correctly.

In Firefox all is well.

Example here: https://jsfiddle.net/p6dp2hLb/2/

enter image description here


You can use ‑ [Unicode Character 'NON-BREAKING HYPHEN' (U+2011)] as an alphabetical character instead of raw dash character because it has its special meanings in formatting.