Remove Jquery references (#1461)

* modify key codes

* formatting

* change string event type

* code clean up
This commit is contained in:
Anthony Dresser
2018-05-23 10:59:28 -07:00
committed by GitHub
parent 259306a8db
commit 04ec9caad1
3 changed files with 14 additions and 11 deletions

View File

@@ -35,6 +35,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { AutoColumnSize } from 'sql/base/browser/ui/table/plugins/autoSizeColumns.plugin';
import { DragCellSelectionModel } from 'sql/base/browser/ui/table/plugins/dragCellSelectionModel.plugin';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
export abstract class GridParentComponent {
// CONSTANTS
@@ -289,7 +290,7 @@ export abstract class GridParentComponent {
protected goToNextGrid() {
if (this.renderedDataSets.length > 0) {
let next = this.activeGrid + 1;
let next = this.activeGrid + 1;
if (next >= this.renderedDataSets.length) {
next = 0;
}
@@ -567,9 +568,7 @@ export abstract class GridParentComponent {
}
keyEvent(e: KeyboardEvent): void {
let self = this;
let handled = self.tryHandleKeyEvent(e);
if (handled) {
if (this.tryHandleKeyEvent(new StandardKeyboardEvent(e))) {
e.preventDefault();
e.stopPropagation();
}
@@ -582,12 +581,12 @@ export abstract class GridParentComponent {
*
* @protected
* @abstract
* @param {any} e
* @param {StandardKeyboardEvent} e
* @returns {boolean}
*
* @memberOf GridParentComponent
*/
protected abstract tryHandleKeyEvent(e): boolean;
protected abstract tryHandleKeyEvent(e: StandardKeyboardEvent): boolean;
resizeGrids(): void {
const self = this;