This commit should fix the issue
https://github.com/discourse/discourse/commit/66aa94c5153b952eee89e3251fd91a349fc0a726
The previous behavior looked like this
You can try the new behaviour here on Meta.
Thanks for reporting the issue @AntiMetaman