Open jtbandes opened 6 days ago
I think we do prevent bubbling sometimes as we handle mouse events in various ways. Seems a bit weird that click works sometimes and sometimes not though.
Yes, even with a capture event listener, I saw the events were sometimes missing. I think this means xtermjs is not intentionally stopping the events, but they are actually never delivered.
When adding
mousedown
,mouseup
, andclick
listeners on the terminal container element, and then clicking on the terminal, I observe that theclick
is sometimes not delivered. (On macOS with a Magic Trackpad, I noticed that theclick
event almost always works when using tap to click and tapping with a single finger, but when actually pressing the trackpad to click it, theclick
event is usually not delivered.)I suspect this is a clue: right-clicking on the logged
event.target
and clicking "Reveal in Elements panel" sometimes shows "Node cannot be found in the current page". Perhaps the browser is not delivering theclick
event because the mousedown/mouseup are not on matching elements, or the clicked element is removed before the click finishes.https://github.com/user-attachments/assets/8b90e791-8cc7-485e-8ec2-fd472db9ae84
Details
Note: same behavior seems to happen with 5.6.0 beta as well: https://codesandbox.io/p/sandbox/xtermjs-test-forked-qfng37
Steps to reproduce
https://codesandbox.io/p/sandbox/xtermjs-test-forked-c5s8g4 Or visit https://c5s8g4.csb.app/ and view the console