@xterm/xterm 6.1.0-beta.90 → 6.1.0-beta.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "6.1.0-beta.90",
4
+ "version": "6.1.0-beta.92",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -114,5 +114,5 @@
114
114
  "ws": "^8.2.3",
115
115
  "xterm-benchmark": "^0.3.1"
116
116
  },
117
- "commit": "c97abced76fe3ca2191b86f6c03c1275b6d4e696"
117
+ "commit": "437490308ca20753cfd42104cd1579faf88bf68c"
118
118
  }
@@ -636,8 +636,8 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
636
636
 
637
637
  // send event to CoreMouseService
638
638
  function sendEvent(ev: MouseEvent | WheelEvent): boolean {
639
- // get mouse coordinates
640
- const pos = self._mouseService!.getMouseReportCoords(ev, self.screenElement!);
639
+ // Get mouse coordinates
640
+ const pos = self._mouseService?.getMouseReportCoords(ev, self.screenElement!);
641
641
  if (!pos) {
642
642
  return false;
643
643
  }
@@ -804,6 +804,16 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
804
804
  // force initial onProtocolChange so we dont miss early mouse requests
805
805
  this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol;
806
806
 
807
+ // Ensure document-level listeners are removed on dispose
808
+ this._register(toDisposable(() => {
809
+ if (requestedEvents.mouseup) {
810
+ this._document!.removeEventListener('mouseup', requestedEvents.mouseup);
811
+ }
812
+ if (requestedEvents.mousedrag) {
813
+ this._document!.removeEventListener('mousemove', requestedEvents.mousedrag);
814
+ }
815
+ }));
816
+
807
817
  /**
808
818
  * "Always on" event listeners.
809
819
  */
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.90';
9
+ export const XTERM_VERSION = '6.1.0-beta.92';