Open chriscalo opened 4 years ago
VisBug is using capture
but if it's captured by the host logic first, then visbug cannot capture that which has already been captured. In order for Visbug to completely take all keyboard commands, it'd need to be a level higher than the page, like devtools is.
aka: i can't steal and keep what's already been stolen. Visbug is a visitor to the page, and sometimes the code there is preventing visbug from getting an effect done or, in this case, keypress management.
thanks for logging this, i'll leave it open, it'd be nice to solve one day!
good point, I hadn't thought about it that way.
In addition to capture
, is VisBug also using event.stopPropagation()
?
Just tried to use VisBug to modify some text via VisBug in the Google Cloud Platform console, and the keys I pressed did things in the host application, including taking me to some other page. In my opinion, if VisBug handles a keyboard event, it should prevent that event from getting to the host application. Otherwise, both VisBug and the host application handle it, which is never what you want.
When I'm in text edit mode, allow me to type and prevent any of those
keypress
,input
, etc events from getting to the host application. Similarly, if I press a keyboard shortcut that VisBug understands, that also should not reach the host application. My assumption is thatevent.stopPropagation()
would do this, but I'm not deeply familiar with how it works.