Today I encountered the funniest bug ever at work.
There was one page that started showing a little Palestian flag 🇵🇸 in the top left corner of the screen, seemingly for no reason.
The cause of the bug turned out to be a left over debug echo in the page script.
Why the hell would this cause a Palestinian flag to be rendered?
* The echo gets inserted at the start of the page (before <!doctype html>).
* Doctype becomes invalid, browser goes into Quirks Mode.
* In Quirks Mode CSS classes become case insensitive.
* We have a FlagKit CSS file that defines classes for flags using two letter country codes with "PS" for "Palestine".
* We also have a CSS file for "Perfect Scrollbar" that has a shorthand CSS class called "ps".
* Quirks mode applied the "PS" styling to the "ps" tag.
Conversation
Notices
-
Embed this notice
SuperDicq (superdicq@minidisc.tokyo)'s status on Friday, 02-Aug-2024 22:53:35 JST SuperDicq
- Alexandre Oliva, narcolepsy and alcoholism :flag: and dilbert 1 like this.
-
Embed this notice
dilbert 1 (sun@shitposter.world)'s status on Friday, 02-Aug-2024 22:56:20 JST dilbert 1
@SuperDicq COMPUTER SAYS RIVER TO THE SEA -
Embed this notice
SuperDicq (superdicq@minidisc.tokyo)'s status on Friday, 02-Aug-2024 23:05:04 JST SuperDicq
@hjvt@hachyderm.io I'm not a front-end dev and I almost never touch the front-end here thankfully.
-
Embed this notice
HJVT (hjvt@hachyderm.io)'s status on Friday, 02-Aug-2024 23:05:05 JST HJVT
@SuperDicq
Browsers were a mistake -
Embed this notice
Alexandre Oliva (lxo@gnusocial.net)'s status on Saturday, 03-Aug-2024 02:19:56 JST Alexandre Oliva
clearly the universe has picked a side
what an odd way to present its decision
:-)