Skip to content

Commit 0f8bab3

Browse files
committed
fix focus regression (introduced in 90bccd0)
1 parent ff5d749 commit 0f8bab3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "slickgrid2",
33
"description": "SlickGrid with pinning, more customizability & faster column sizing",
4-
"version": "12.1.7",
4+
"version": "12.1.8",
55
"license": "MIT",
66
"homepage": "https://github.com/coatue/SlickGrid",
77
"repository": {

src/grid.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -3026,7 +3026,7 @@ export class SlickGrid {
30263026
// don't steal it back - keyboard events will still bubble up
30273027
// IE9+ seems to default DIVs to tabIndex=0 instead of -1, so check for cell clicks directly.
30283028
if (e.target != document.activeElement || $(e.target).hasClass("cell")) {
3029-
focus();
3029+
this.focus();
30303030
}
30313031
}
30323032

@@ -3414,7 +3414,7 @@ export class SlickGrid {
34143414
var item = this.getDataItem(this.activeRow);
34153415

34163416
if (this.trigger(this.onBeforeEditCell, {row: this.activeRow, cell: this.activeCell, item: item, column: columnDef}) === false) {
3417-
focus();
3417+
this.focus();
34183418
return;
34193419
}
34203420

@@ -3452,7 +3452,7 @@ export class SlickGrid {
34523452
// if the commit fails, it would do so due to a validation error
34533453
// if so, do not steal the focus from the editor
34543454
if (this.getEditorLock().commitCurrentEdit()) {
3455-
focus();
3455+
this.focus();
34563456
if (this.options.autoEdit) {
34573457
this.navigateDown();
34583458
}
@@ -3461,7 +3461,7 @@ export class SlickGrid {
34613461

34623462
private cancelEditAndSetFocus() {
34633463
if (this.getEditorLock().cancelCurrentEdit()) {
3464-
focus();
3464+
this.focus();
34653465
}
34663466
}
34673467

@@ -3854,7 +3854,7 @@ export class SlickGrid {
38543854
if (!this.getEditorLock().commitCurrentEdit()) {
38553855
return true;
38563856
}
3857-
focus();
3857+
this.focus();
38583858

38593859
var tabbingDirections = {
38603860
up: -1,
@@ -3988,7 +3988,7 @@ export class SlickGrid {
39883988

39893989
// if no editor was created, set the focus back on the grid
39903990
if (!this.currentEditor) {
3991-
focus();
3991+
this.focus();
39923992
}
39933993
}
39943994

0 commit comments

Comments
 (0)