I was playing on my Minecraft server and my hand was empty. I looked at the fence, but instead of mining it with my left mouse button, I accidentally pressed the right mouse button. Then I realized that if you have an empty hand and press the right mouse button and look at a fence, your arm moves, but nothing happens (like it's supposed to, but your arm is not supposed to move forward like you're mining). If it makes reproducing the result easier, I was playing in Creative mode, but I don't think this matters.
Related issues
Comments

This issue has been reported already. It has been linked to the original bugreport.
Please search before reporting any bugs, as it's likely that one exists already.