mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 20:39:37 +00:00
Fix spelling on dom listeners
This commit is contained in:
parent
e102191a6f
commit
7be5b48a14
|
@ -97,26 +97,26 @@ export let addStandardDisposableListener: IAddStandardDisposableListenerSignatur
|
|||
return addDisposableListener(node, type, wrapHandler, useCapture);
|
||||
};
|
||||
|
||||
export let addStandardDisposableGenericMouseDownListner = function addStandardDisposableListener(node: HTMLElement, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
export let addStandardDisposableGenericMouseDownListener = function addStandardDisposableListener(node: HTMLElement, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
let wrapHandler = _wrapAsStandardMouseEvent(handler);
|
||||
|
||||
return addDisposableGenericMouseDownListner(node, wrapHandler, useCapture);
|
||||
return addDisposableGenericMouseDownListener(node, wrapHandler, useCapture);
|
||||
};
|
||||
|
||||
export let addStandardDisposableGenericMouseUpListner = function addStandardDisposableListener(node: HTMLElement, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
export let addStandardDisposableGenericMouseUpListener = function addStandardDisposableListener(node: HTMLElement, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
let wrapHandler = _wrapAsStandardMouseEvent(handler);
|
||||
|
||||
return addDisposableGenericMouseUpListner(node, wrapHandler, useCapture);
|
||||
return addDisposableGenericMouseUpListener(node, wrapHandler, useCapture);
|
||||
};
|
||||
export function addDisposableGenericMouseDownListner(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
export function addDisposableGenericMouseDownListener(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
return addDisposableListener(node, platform.isIOS && BrowserFeatures.pointerEvents ? EventType.POINTER_DOWN : EventType.MOUSE_DOWN, handler, useCapture);
|
||||
}
|
||||
|
||||
export function addDisposableGenericMouseMoveListner(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
export function addDisposableGenericMouseMoveListener(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
return addDisposableListener(node, platform.isIOS && BrowserFeatures.pointerEvents ? EventType.POINTER_MOVE : EventType.MOUSE_MOVE, handler, useCapture);
|
||||
}
|
||||
|
||||
export function addDisposableGenericMouseUpListner(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
export function addDisposableGenericMouseUpListener(node: EventTarget, handler: (event: any) => void, useCapture?: boolean): IDisposable {
|
||||
return addDisposableListener(node, platform.isIOS && BrowserFeatures.pointerEvents ? EventType.POINTER_UP : EventType.MOUSE_UP, handler, useCapture);
|
||||
}
|
||||
export function addDisposableNonBubblingMouseOutListener(node: Element, handler: (event: MouseEvent) => void): IDisposable {
|
||||
|
|
|
@ -77,7 +77,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
|
|||
}));
|
||||
|
||||
Gesture.ignoreTarget(this._domNode);
|
||||
this._register(dom.addStandardDisposableGenericMouseDownListner(this._domNode, e => {
|
||||
this._register(dom.addStandardDisposableGenericMouseDownListener(this._domNode, e => {
|
||||
if (this.state.type !== LightBulbState.Type.Showing) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ class SaturationBox extends Disposable {
|
|||
|
||||
this.layout();
|
||||
|
||||
this._register(dom.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));
|
||||
this._register(dom.addDisposableGenericMouseDownListener(this.domNode, e => this.onMouseDown(e)));
|
||||
this._register(this.model.onDidChangeColor(this.onDidChangeColor, this));
|
||||
this.monitor = null;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ class SaturationBox extends Disposable {
|
|||
|
||||
this.monitor.startMonitoring(<HTMLElement>e.target, e.buttons, standardMouseMoveMerger, event => this.onDidChangePosition(event.posx - origin.left, event.posy - origin.top), () => null);
|
||||
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListner(document, () => {
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListener(document, () => {
|
||||
this._onColorFlushed.fire();
|
||||
mouseUpListener.dispose();
|
||||
if (this.monitor) {
|
||||
|
@ -258,7 +258,7 @@ abstract class Strip extends Disposable {
|
|||
this.slider = dom.append(this.domNode, $('.slider'));
|
||||
this.slider.style.top = `0px`;
|
||||
|
||||
this._register(dom.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));
|
||||
this._register(dom.addDisposableGenericMouseDownListener(this.domNode, e => this.onMouseDown(e)));
|
||||
this.layout();
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ abstract class Strip extends Disposable {
|
|||
|
||||
monitor.startMonitoring(<HTMLElement>e.target, e.buttons, standardMouseMoveMerger, event => this.onDidChangeTop(event.posy - origin.top), () => null);
|
||||
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListner(document, () => {
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListener(document, () => {
|
||||
this._onColorFlushed.fire();
|
||||
mouseUpListener.dispose();
|
||||
monitor.stopMonitoring(true);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { Part } from 'vs/workbench/browser/part';
|
||||
import { Dimension, isAncestor, $, EventHelper, addDisposableGenericMouseDownListner } from 'vs/base/browser/dom';
|
||||
import { Dimension, isAncestor, $, EventHelper, addDisposableGenericMouseDownListener } from 'vs/base/browser/dom';
|
||||
import { Event, Emitter, Relay } from 'vs/base/common/event';
|
||||
import { contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { GroupDirection, IAddGroupOptions, GroupsArrangement, GroupOrientation, IMergeGroupOptions, MergeGroupMode, GroupsOrder, GroupLocation, IFindGroupScope, EditorGroupLayout, GroupLayoutArgument, IEditorGroupsService, IEditorSideGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
|
@ -891,7 +891,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
|
|||
parent.appendChild(overlay);
|
||||
|
||||
// Hide the block if a mouse down event occurs #99065
|
||||
this._register(addDisposableGenericMouseDownListner(overlay, () => overlay.classList.remove('visible')));
|
||||
this._register(addDisposableGenericMouseDownListener(overlay, () => overlay.classList.remove('visible')));
|
||||
|
||||
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.element, {
|
||||
onDragStart: e => overlay.classList.add('visible'),
|
||||
|
|
|
@ -131,7 +131,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
|||
}));
|
||||
this._register(dom.addDisposableListener(window, dom.EventType.RESIZE, () => this.setCoordinates()));
|
||||
|
||||
this._register(dom.addDisposableGenericMouseUpListner(this.dragArea, (event: MouseEvent) => {
|
||||
this._register(dom.addDisposableGenericMouseUpListener(this.dragArea, (event: MouseEvent) => {
|
||||
const mouseClickEvent = new StandardMouseEvent(event);
|
||||
if (mouseClickEvent.detail === 2) {
|
||||
// double click on debug bar centers it again #8250
|
||||
|
@ -141,10 +141,10 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
|||
}
|
||||
}));
|
||||
|
||||
this._register(dom.addDisposableGenericMouseDownListner(this.dragArea, (event: MouseEvent) => {
|
||||
this._register(dom.addDisposableGenericMouseDownListener(this.dragArea, (event: MouseEvent) => {
|
||||
this.dragArea.classList.add('dragged');
|
||||
|
||||
const mouseMoveListener = dom.addDisposableGenericMouseMoveListner(window, (e: MouseEvent) => {
|
||||
const mouseMoveListener = dom.addDisposableGenericMouseMoveListener(window, (e: MouseEvent) => {
|
||||
const mouseMoveEvent = new StandardMouseEvent(e);
|
||||
// Prevent default to stop editor selecting text #8524
|
||||
mouseMoveEvent.preventDefault();
|
||||
|
@ -152,7 +152,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
|||
this.setCoordinates(mouseMoveEvent.posx - 14, mouseMoveEvent.posy - (this.layoutService.offset?.top ?? 0));
|
||||
});
|
||||
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListner(window, (e: MouseEvent) => {
|
||||
const mouseUpListener = dom.addDisposableGenericMouseUpListener(window, (e: MouseEvent) => {
|
||||
this.storePosition();
|
||||
this.dragArea.classList.remove('dragged');
|
||||
|
||||
|
|
|
@ -229,13 +229,13 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD
|
|||
this._webviewTransparentCover = DOM.append(this._list.rowsContainer, $('.webview-cover'));
|
||||
this._webviewTransparentCover.style.display = 'none';
|
||||
|
||||
this._register(DOM.addStandardDisposableGenericMouseDownListner(this._overflowContainer, (e: StandardMouseEvent) => {
|
||||
this._register(DOM.addStandardDisposableGenericMouseDownListener(this._overflowContainer, (e: StandardMouseEvent) => {
|
||||
if (e.target.classList.contains('slider') && this._webviewTransparentCover) {
|
||||
this._webviewTransparentCover.style.display = 'block';
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(DOM.addStandardDisposableGenericMouseUpListner(this._overflowContainer, () => {
|
||||
this._register(DOM.addStandardDisposableGenericMouseUpListener(this._overflowContainer, () => {
|
||||
if (this._webviewTransparentCover) {
|
||||
// no matter when
|
||||
this._webviewTransparentCover.style.display = 'none';
|
||||
|
|
|
@ -998,13 +998,13 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
|
|||
this._webviewTransparentCover = DOM.append(this._list.rowsContainer, $('.webview-cover'));
|
||||
this._webviewTransparentCover.style.display = 'none';
|
||||
|
||||
this._register(DOM.addStandardDisposableGenericMouseDownListner(this._overlayContainer, (e: StandardMouseEvent) => {
|
||||
this._register(DOM.addStandardDisposableGenericMouseDownListener(this._overlayContainer, (e: StandardMouseEvent) => {
|
||||
if (e.target.classList.contains('slider') && this._webviewTransparentCover) {
|
||||
this._webviewTransparentCover.style.display = 'block';
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(DOM.addStandardDisposableGenericMouseUpListner(this._overlayContainer, () => {
|
||||
this._register(DOM.addStandardDisposableGenericMouseUpListener(this._overlayContainer, () => {
|
||||
if (this._webviewTransparentCover) {
|
||||
// no matter when
|
||||
this._webviewTransparentCover.style.display = 'none';
|
||||
|
|
Loading…
Reference in a new issue