I physically winced when a beta tester of the poketto.me Android app reported this bug:

“Sometimes, adding new tags to a Save doesn’t work. I open the tagging dialog, type a new tag, click ‘save’ — the input field clears, but the new tag is nowhere to be seen.”

I was able to reproduce the issue on my phone and in an Android emulator.
Gut reaction: “Ah, must be the WebView. WebViews always behave differently than a normal browser. This will be a mess.”

I already dreaded debugging it. (Yes, Chrome DevTools can inspect a WebView remotely over the air on a real device — but it’s a hassle, trust me.)

Next test: Same steps, but in Chrome on Android — same bug.
New theory: “Okay, so Chrome on Android has the issue, not just WebView. That’s at least a bit easier to debug.”

Before going down that road, I “fixed” a few things in the tagging dialog (event propagation, layout tweaks, Angular component dependencies…) and tested again.
No improvement.

After too much back-and-forth, I finally realized my intuition was completely wrong. The bug had nothing to do with:

➡️ WebViews
➡️ Chrome on Android
➡️ Or even mobile browsers in general

It was a boring, plain-old bug reproducible on desktop too:
If you added a “new” tag that matched an existing one except for case (e.g., “Ai” instead of “ai”), it silently failed.

The cause? A tiny oversight from when I first implemented tag “streamlining” (lowercasing tags, replacing spaces with hyphens, etc.). One part of the code did the normalization, another assumed it had already been done. So:

  • Check if tag exists? → Looks for Ai

  • Add new tag? → Converts to ai → Thinks it’s different

And why was this reported on mobile? Turns out, the on-screen-keyboard in combination with autocorrect will uppercase the users’s input (if you don’t prevent that). Hence, tapping “a” and then “i” would enter “Ai”, thus triggering the bug.

Lesson learned: Always thoroughly test and reproduce reported bugs *before* a) sweating over something completely unrelated, and
b) blaming someone else (Chrome, Android, the universe).