The code you pasted appears to work fine when I try it.
Is there any specific steps to take to reproduce the bug?
What browser version are you using? have you tried updating to the latest version?
Can you describe or provide a video showing where/how it fails?