I have a three-dimensional scene based on three.js that occupies the entire window.
I have angular loads an html overlay that occupies a 20% wide column on the right side.
I use something similar to find out where the event occurred - Javascript event handler on body but not on input
Now the problem is that I click the checkbox on the html overlay. Any future keyboard event (for example, w, a, s, d to move the camera in my 3D scene) has a value of target =.
Even if I click on a 3D scene and fire a keyboard event, the input of the target.
I need to remove the html overlay, and then all future keyboard events will have the target body.
How do I let the user switch the event target without removing the html overlay?
user494461
source
share