The bubble/oxygen bar appears when you are inside of a block. Lava isn't affected, however, regular blocks are, this is not an unintended behavior.
How to reproduce the issue: Suffocate yourself in any block.
Expected result: You should take damage because of suffocation and the oxygen bar should not appear.
Observed result: The oxygen bar appears and depletes as you suffocate.
Related issues
is duplicated by
relates to
Attachments
Comments


Still affects 1.6.0.1

Still affects 1.6.0.5

Still affects 1.6.0.6

Still affects 1.6.0.8

This still affects 1.9, and on windows 10/xbox one.

Still affects 1.11.4

Still affects 1.12.0.12 beta

Confirmed!
They could make you wait to suffocate till the bar is empty...

Still happening.

Affects 1.16.40 Hotfix.
Affects 1.16.100.55 Beta.

Affects 1.16.100.56 Beta.

This may be intentional. Because you are suffocating, its maybe the same reason for you are drowning. The code may be: if player is in block, oxygen bar appear. since water is technically a block, it will appear.

@ItsEmbezz This did not happen in earlier versions. First notice was around June 2018. I personally did not see it prior to then.
@Giye It's any block. My screenshot (attached above) is in a grass block while on a horse.

affects 1.16.230.54

affects 1.17.10

Affects 1.17.11

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – Feature Requests and Suggestions
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki