WebGL cursor visability problem

in this game i am trying to make cursor visible on first Escape click. I set lockstate to none and visible to true, but as far as i understand because of standard browser Escape functionality its works only on seond press. Tab key working perfectly fine and show cursor on first press. How can i make cursor visible on first Escape press? I know its possible because i saw other game did it.