Permalink
Browse files

fix: 优化grid编辑下连续点击出错的问题

  • Loading branch information...
1 parent 4433d23 commit d8b35b612cba9bb4e54883caf96e7c3f44296103 yuekai liu committed Dec 2, 2016
Showing with 17 additions and 2 deletions.
  1. +2 −1 js/gridCompClick.js
  2. +15 −1 js/re_gridCompEdit.js
View
@@ -70,6 +70,7 @@ const clickFun = function(e){
if(oThis.options.rowClickBan){
return;
}
+ this.clickFunEdit(e,index);
var rowChildIndex = oThis.getChildRowIndex(row);
if(oThis.options.contentFocus || !oThis.options.multiSelect){
if(oThis.dataSourceObj.rows[index].focus && oThis.options.cancelFocus){
@@ -89,7 +90,7 @@ const clickFun = function(e){
}
}
}
- this.clickFunEdit(e,index);
+
}
}
};
View
@@ -273,13 +273,27 @@ const editRow = function($tr,colIndex){
*/
const re_editClose = function(){
var row = this.dataSourceObj.rows[this.eidtRowIndex];
+ var inputDom = null;
+ try{
+ var inputDom = this.editComp.element.parentNode.querySelector('input');
+ }catch(e){
+ }
+
+ if(inputDom){
+ inputDom.blur();
+ }
if(this.editComp && this.editComp.hide){
this.editComp.hide();
}
if (this.editComp && this.editComp.comp && this.editComp.comp.hide) {
this.editComp.comp.hide();
}
- $('#' + this.options.id + '_placeholder_div').remove();
+ try{
+ $('#' + this.options.id + '_placeholder_div').remove();
+ }catch(e){
+
+ }
+
if(!row)
return;
if(this.options.editType != 'form'){

0 comments on commit d8b35b6

Please sign in to comment.