Open wellcomez opened 1 month ago
So I wonder whether there are global variables existed which prevent call re-enter
I dont think so, if there is, than it is prolly a dangling listener, that should have been disposed.
Its not clear, what you do on initial startup, because none of the mouse tracking protocols are active on startup by default. There has to be some payload triggering a mouse tracking sequence. Otherwise mouse tracking is always off after startup.
//clean object this.term.clear(); this.term.dispose(); this.term.reset()
term.dispose()
is all you need here, dispose is for when you want to dispose the object and all its components and never use it again. clear
clears the buffer (keeps modes, etc.), reset
resets it to a clean slate (similar to calling dispose
and new Terminal
).
//clean object this.term.clear(); this.term.dispose(); this.term.reset()
term.dispose()
is all you need here, dispose is for when you want to dispose the object and all its components and never use it again.clear
clears the buffer (keeps modes, etc.),reset
resets it to a clean slate (similar to callingdispose
andnew Terminal
).
It looks , necessary function is called, is there any other step should be done ?
Details
Steps to reproduce
clear and close term obj
Then create obj again
term key event still ok but mouse event not
About mouse support
After I read and trace xterm.js, it will be enable after v100/drag protocol is registered . First time create term object , register will be called but second time not. So I wonder whether there are global variables existed which prevent call re-enter