Open jtbandes opened 2 hours ago
I think in the past we didn't add this as you can just add regular dom listeners to Terminal.element
after calling Terminal.open
:
I tried that as well, but it didn't work. Example: https://codesandbox.io/p/sandbox/xtermjs-test-forked-rfznf7
Ah I see, it works with terminal.textarea
but not terminal.element
. Thanks! 🎉
I would like to clear the selection when the terminal loses focus. I was able to make it work like this:
It would be nice to expose this
onBlur
event on the public Terminal interface so people don't have to use private API for it.(Probably
onFocus
too, I just didn't happen to need that one.)