fix bug
This commit is contained in:
parent
c7ffd9b8b5
commit
c2a7198713
|
@ -738,7 +738,7 @@ define([
|
||||||
if (_.indexOf(this.moveKeys, data.keyCode)>-1 || data.keyCode==Common.UI.Keys.RETURN) {
|
if (_.indexOf(this.moveKeys, data.keyCode)>-1 || data.keyCode==Common.UI.Keys.RETURN) {
|
||||||
data.preventDefault();
|
data.preventDefault();
|
||||||
data.stopPropagation();
|
data.stopPropagation();
|
||||||
var rec = this.currentSelectedRec;
|
var rec =(this.multiSelect) ? this.currentSelectedRec : this.getSelectedRec();
|
||||||
if (this.lastSelectedRec === null)
|
if (this.lastSelectedRec === null)
|
||||||
this.lastSelectedRec = rec;
|
this.lastSelectedRec = rec;
|
||||||
if (data.keyCode == Common.UI.Keys.RETURN) {
|
if (data.keyCode == Common.UI.Keys.RETURN) {
|
||||||
|
@ -751,7 +751,7 @@ define([
|
||||||
if (this.parentMenu)
|
if (this.parentMenu)
|
||||||
this.parentMenu.hide();
|
this.parentMenu.hide();
|
||||||
} else {
|
} else {
|
||||||
var idx = _.indexOf(this.store.models, this.lastSelectedRec);
|
var idx = (!this.multiSelect)? _.indexOf(this.store.models, rec):_.indexOf(this.store.models, this.lastSelectedRec);
|
||||||
if (idx<0) {
|
if (idx<0) {
|
||||||
if (data.keyCode==Common.UI.Keys.LEFT) {
|
if (data.keyCode==Common.UI.Keys.LEFT) {
|
||||||
var target = $(e.target).closest('.dropdown-submenu.over');
|
var target = $(e.target).closest('.dropdown-submenu.over');
|
||||||
|
@ -824,7 +824,8 @@ define([
|
||||||
this.selectRecord(rec);
|
this.selectRecord(rec);
|
||||||
this.scrollToRecord(rec);
|
this.scrollToRecord(rec);
|
||||||
this._fromKeyDown = false;
|
this._fromKeyDown = false;
|
||||||
this.lastSelectedRec = rec;
|
if(this.multiSelect)
|
||||||
|
this.lastSelectedRec = rec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue