MozillaReality / horizon

(2015) Horizon was an experimental VR browser built on web standards using CSS-VR.
http://mozvr.github.io/horizon/web/
Other
1 stars 0 forks source link

dispatch key up event after input focus, fixes #258 #259

Open caseyyee opened 8 years ago

caseyyee commented 8 years ago

fixes https://github.com/MozVR/horizon/issues/258

This is caused by the keyup event not being dispatched, which allows this bit of code to run: https://github.com/MozVR/horizon/blob/master/src/web/js/components/cursor.js#L304-L309

cvan commented 8 years ago

could you put the issue number in the commit message?

cvan commented 8 years ago

this might fix the issue in #258.

maybe I'm misunderstanding, but why though would do we want to fire keyup when we focus?

caseyyee commented 8 years ago

yes, this fixes #258. The keyup isn't dispatching which is causing this code https://github.com/MozVR/horizon/blob/master/src/web/js/components/cursor.js#L304-L309 to run past the timeout (it becomes sticky)

The easier solution is to remove those lines altogether as per https://github.com/MozVR/horizon/pull/260, but I'm going to experiment with press-and-hold interaction which will require similar code.