You can swim up in water that is enclosed in cactus, therefore it has to do with collision.
Reproduction
1. Make cactus hole by enclosing cactus.
2. Pour water inside cactus
3. Go to the edge of one of the cactus and you will be affected by water.
Attachments
Comments 12
This happens also with chests and should happen with any block that is slightly smaller than one block length.
Again, this is not a bug, cactus, chest and fence are blocks that aren't a full block. It is only logical that you can interact with what's behind it. This is probably most understandable for fences, you can see that you'r actually in the water when walking up against them. Same goes for chest and cactus, but now you are only touching the water a little bit.
But it is right that you are able to swim up in water of which only approximately 2.5 inches affect you? Pretty sure: no.
In minecraft: yes. If you stand in lava for 2.5 inches it also burns you. And if you were to change it, then what would be the limit?
Half of your body? The very middle of your player should be affected by the water. But that is not the point of this ticket, since it would be a feature request.
The only way of proving its intention is by awaiting Mojang's official handling concerning this ticket. You and me are both unable to say what is true. Just wanted to share my thoughts in this topic. 😉
I don't get the bug here ?
Of course you can swim up in water enclosed by cacti like you can swim up in water enclosed by any other block.
If I get in "the edge" like you said, the cactus will hurt me