Hacker News new | ask | show | jobs
by shreddit 25 days ago
It doesn’t seem to like spaces that much, the code for [QR coded] is broken for me on safari ios. When the space is removed it’s a working qrcode again
2 comments

The page addresses this issue, saying that browser text wrapping can cause issues and gives advice on how to deal with it.
I think this is a different problem.

The page says that “browsers may split a QR code across lines” - but this isn’t split across lines.

Experimenting, if I just type "[Q R]" (very short, so not likely to line-break), the problem still occurs.

If I inspect the element, and add `white-space: nowrap;` to its style, the problem still occurs (although the text doesn’t wrap!).

I haven't tried on macos, but yeah, the biggest problem right now seems to be implementation differences with how embedded spaces are handled. Earlier, the biggest cross-browser issues were pixel alignments within the QR codes, but those seem largely resolved.
It looks like Safari doesn't render this correctly (checked on macOS). Works fine in Chrome and Firefox, though. Must be a Safari quirk of some kind.