Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a (#7436)

* Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a

* fix strict null checks
This commit is contained in:
Anthony Dresser
2019-09-30 23:35:45 -07:00
committed by GitHub
parent 6ab03053a0
commit 084524cd2d
196 changed files with 2927 additions and 2547 deletions

View File

@@ -103,7 +103,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
render(container: HTMLElement): void {
this.element = container;
Gesture.addTarget(container);
this._register(Gesture.addTarget(container));
const enableDragging = this.options && this.options.draggable;
if (enableDragging) {

View File

@@ -63,7 +63,7 @@ export class Button extends Disposable {
container.appendChild(this._element);
Gesture.addTarget(this._element);
this._register(Gesture.addTarget(this._element));
[DOM.EventType.CLICK, EventType.Tap].forEach(eventType => {
this._register(DOM.addDisposableListener(this._element, eventType, e => {

View File

@@ -83,7 +83,7 @@ export class BaseDropdown extends ActionRunner {
this._register(cleanupFn);
}
Gesture.addTarget(this._label);
this._register(Gesture.addTarget(this._label));
}
get element(): HTMLElement {

View File

@@ -236,7 +236,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
this.rowsContainer = document.createElement('div');
this.rowsContainer.className = 'monaco-list-rows';
Gesture.addTarget(this.rowsContainer);
this.disposables.add(Gesture.addTarget(this.rowsContainer));
this.scrollableElement = this.disposables.add(new ScrollableElement(this.rowsContainer, {
alwaysConsumeMouseWheel: true,

View File

@@ -542,7 +542,7 @@ export class MouseController<T> implements IDisposable {
list.onContextMenu(this.onContextMenu, this, this.disposables);
list.onMouseDblClick(this.onDoubleClick, this, this.disposables);
list.onTouchStart(this.onMouseDown, this, this.disposables);
Gesture.addTarget(list.getHTMLElement());
this.disposables.add(Gesture.addTarget(list.getHTMLElement()));
}
list.onMouseClick(this.onPointer, this, this.disposables);

View File

@@ -398,7 +398,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
EventHelper.stop(e, true);
this.onClick(e);
}));
}, 50);
}, 100);
this._register(this.runOnceToEnableMouseUp);
}

View File

@@ -238,7 +238,7 @@ export class MenuBar extends Disposable {
}
}));
Gesture.addTarget(buttonElement);
this._register(Gesture.addTarget(buttonElement));
this._register(DOM.addDisposableListener(buttonElement, EventType.Tap, (e: GestureEvent) => {
// Ignore this touch if the menu is touched
if (this.isOpen && this.focusedMenu && this.focusedMenu.holder && DOM.isAncestor(e.initialTarget as HTMLElement, this.focusedMenu.holder)) {
@@ -322,7 +322,7 @@ export class MenuBar extends Disposable {
}
}));
Gesture.addTarget(buttonElement);
this._register(Gesture.addTarget(buttonElement));
this._register(DOM.addDisposableListener(buttonElement, EventType.Tap, (e: GestureEvent) => {
// Ignore this touch if the menu is touched
if (this.isOpen && this.focusedMenu && this.focusedMenu.holder && DOM.isAncestor(e.initialTarget as HTMLElement, this.focusedMenu.holder)) {

View File

@@ -1,6 +1,6 @@
@font-face {
font-family: "octicons";
src: url("./octicons.ttf?628f71ee09945d25ba5fceb0c17f7b0f") format("truetype");
src: url("./octicons.ttf?1829db8570ee0fa5a4bef3bb41d5f62e") format("truetype");
}
.octicon, .mega-octicon {

View File

@@ -139,7 +139,7 @@ export class Sash extends Disposable {
this._register(domEvent(this.el, 'mousedown')(this.onMouseDown, this));
this._register(domEvent(this.el, 'dblclick')(this.onMouseDoubleClick, this));
Gesture.addTarget(this.el);
this._register(Gesture.addTarget(this.el));
this._register(domEvent(this.el, EventType.Start)(this.onTouchStart, this));
if (isIPad) {