From f090fa822d145bb1b4414819a39b50d9233433dd Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Sun, 6 Jan 2019 15:07:36 -0800 Subject: [PATCH 1/2] doc: fix typos --- src/Terminal.ts | 2 +- src/common/EventEmitter.ts | 2 +- src/ui/Lifecycle.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index bc97de29ff..4c0cd0f8a4 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -1391,7 +1391,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II * processed by the terminal and what keys should not. * @param customKeyEventHandler The custom KeyboardEvent handler to attach. * This is a function that takes a KeyboardEvent, allowing consumers to stop - * propogation and/or prevent the default action. The function returns whether + * propagation and/or prevent the default action. The function returns whether * the event should be processed by xterm.js. */ public attachCustomKeyEventHandler(customKeyEventHandler: CustomKeyEventHandler): void { diff --git a/src/common/EventEmitter.ts b/src/common/EventEmitter.ts index f9c0c0014e..fb95ae9214 100644 --- a/src/common/EventEmitter.ts +++ b/src/common/EventEmitter.ts @@ -23,7 +23,7 @@ export class EventEmitter extends Disposable implements IEventEmitter, IDisposab } /** - * Adds a disposabe listener to the EventEmitter, returning the disposable. + * Adds a disposable listener to the EventEmitter, returning the disposable. * @param type The event type. * @param handler The handler for the listener. */ diff --git a/src/ui/Lifecycle.ts b/src/ui/Lifecycle.ts index d836711386..9f058106a6 100644 --- a/src/ui/Lifecycle.ts +++ b/src/ui/Lifecycle.ts @@ -6,7 +6,7 @@ import { IDisposable } from 'xterm'; /** - * Adds a disposabe listener to a node in the DOM, returning the disposable. + * Adds a disposable listener to a node in the DOM, returning the disposable. * @param type The event type. * @param handler The handler for the listener. */ From f04f2efc52b8dad12ca9fab46d47981b8ee9a9f7 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswami Date: Sun, 6 Jan 2019 15:09:57 -0800 Subject: [PATCH 2/2] doc: fix more typos --- src/CompositionHelper.ts | 12 ++++++------ src/SelectionManager.ts | 2 +- src/core/input/Keyboard.ts | 2 +- typings/xterm.d.ts | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/CompositionHelper.ts b/src/CompositionHelper.ts index b1745d41ed..31ad866b48 100644 --- a/src/CompositionHelper.ts +++ b/src/CompositionHelper.ts @@ -111,17 +111,17 @@ export class CompositionHelper { /** * Finalizes the composition, resuming regular input actions. This is called when a composition * is ending. - * @param waitForPropogation Whether to wait for events to propogate before sending + * @param waitForPropagation Whether to wait for events to propagate before sending * the input. This should be false if a non-composition keystroke is entered before the - * compositionend event is triggered, such as enter, so that the composition is send before + * compositionend event is triggered, such as enter, so that the composition is sent before * the command is executed. */ - private _finalizeComposition(waitForPropogation: boolean): void { + private _finalizeComposition(waitForPropagation: boolean): void { this._compositionView.classList.remove('active'); this._isComposing = false; this._clearTextareaPosition(); - if (!waitForPropogation) { + if (!waitForPropagation) { // Cancel any delayed composition send requests and send the input immediately. this._isSendingComposition = false; const input = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end); @@ -136,8 +136,8 @@ export class CompositionHelper { // Since composition* events happen before the changes take place in the textarea on most // browsers, use a setTimeout with 0ms time to allow the native compositionend event to - // complete. This ensures the correct character is retrieved, this solution was used - // because: + // complete. This ensures the correct character is retrieved. + // This solution was used because: // - The compositionend event's data property is unreliable, at least on Chromium // - The last compositionupdate event's data property does not always accurately describe // the character, a counter example being Korean where an ending consonsant can move to diff --git a/src/SelectionManager.ts b/src/SelectionManager.ts index 1aea1cb53a..f93328fe6f 100644 --- a/src/SelectionManager.ts +++ b/src/SelectionManager.ts @@ -552,7 +552,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager */ private _onMouseMove(event: MouseEvent): void { // If the mousemove listener is active it means that a selection is - // currently being made, we should stop propogation to prevent mouse events + // currently being made, we should stop propagation to prevent mouse events // to be sent to the pty. event.stopImmediatePropagation(); diff --git a/src/core/input/Keyboard.ts b/src/core/input/Keyboard.ts index 9d86b34942..b5df46c46b 100644 --- a/src/core/input/Keyboard.ts +++ b/src/core/input/Keyboard.ts @@ -44,7 +44,7 @@ export function evaluateKeyboardEvent( ): IKeyboardResult { const result: IKeyboardResult = { type: KeyboardResultType.SEND_KEY, - // Whether to cancel event propogation (NOTE: this may not be needed since the event is + // Whether to cancel event propagation (NOTE: this may not be needed since the event is // canceled at the end of keyDown cancel: false, // The new key even to emit diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index c5d2b0204e..11fab9097e 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -465,7 +465,7 @@ declare module 'xterm' { * should be processed by the terminal and what keys should not. * @param customKeyEventHandler The custom KeyboardEvent handler to attach. * This is a function that takes a KeyboardEvent, allowing consumers to stop - * propogation and/or prevent the default action. The function returns + * propagation and/or prevent the default action. The function returns * whether the event should be processed by xterm.js. */ attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void;