@xterm/xterm 5.4.0-beta.19 → 5.4.0-beta.20

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": "5.4.0-beta.19",
4
+ "version": "5.4.0-beta.20",
5
5
  "main": "lib/xterm.js",
6
6
  "style": "css/xterm.css",
7
7
  "types": "typings/xterm.d.ts",
@@ -261,11 +261,10 @@ export class Terminal extends CoreTerminal implements ITerminal {
261
261
  /**
262
262
  * Binds the desired focus behavior on a given terminal object.
263
263
  */
264
- private _handleTextAreaFocus(ev: KeyboardEvent): void {
264
+ private _handleTextAreaFocus(ev: FocusEvent): void {
265
265
  if (this.coreService.decPrivateModes.sendFocus) {
266
266
  this.coreService.triggerDataEvent(C0.ESC + '[I');
267
267
  }
268
- this.updateCursorStyle(ev);
269
268
  this.element!.classList.add('focus');
270
269
  this._showCursor();
271
270
  this._onFocus.fire();
@@ -429,6 +428,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
429
428
 
430
429
  this.screenElement = this._document.createElement('div');
431
430
  this.screenElement.classList.add('xterm-screen');
431
+ this.register(addDisposableDomListener(this.screenElement, 'mousemove', (ev: MouseEvent) => this.updateCursorStyle(ev)));
432
432
  // Create the container that will hold helpers like the textarea for
433
433
  // capturing DOM Events. Then produce the helpers.
434
434
  this._helperContainer = this._document.createElement('div');
@@ -459,11 +459,10 @@ export class Terminal extends CoreTerminal implements ITerminal {
459
459
  ));
460
460
  this._instantiationService.setService(ICoreBrowserService, this._coreBrowserService);
461
461
 
462
- this.register(addDisposableDomListener(this.textarea, 'focus', (ev: KeyboardEvent) => this._handleTextAreaFocus(ev)));
462
+ this.register(addDisposableDomListener(this.textarea, 'focus', (ev: FocusEvent) => this._handleTextAreaFocus(ev)));
463
463
  this.register(addDisposableDomListener(this.textarea, 'blur', () => this._handleTextAreaBlur()));
464
464
  this._helperContainer.appendChild(this.textarea);
465
465
 
466
-
467
466
  this._charSizeService = this._instantiationService.createInstance(CharSizeService, this._document, this._helperContainer);
468
467
  this._instantiationService.setService(ICharSizeService, this._charSizeService);
469
468
 
@@ -855,7 +854,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
855
854
  /**
856
855
  * Change the cursor style for different selection modes
857
856
  */
858
- public updateCursorStyle(ev: KeyboardEvent): void {
857
+ public updateCursorStyle(ev: KeyboardEvent | MouseEvent): void {
859
858
  if (this._selectionService?.shouldColumnSelect(ev)) {
860
859
  this.element!.classList.add('column-select');
861
860
  } else {