简体   繁体   English

Handsontable错误:在jquery ui内部启动时,对话框不可编辑

[英]handsontable bug: when launched inside jquery ui dialog boxes are unedittable

I have some pretty simply jQuery that runs inside a dialog jquery ui popup box 我有一些在对话框jquery ui弹出框内运行的非常简单的jQuery

$.ajax({  
      url: 'json.php?supplier_id=' + supplier_id, 
      dataType: 'json', 
      type: 'GET', 
      success: function(res){ 
        $("#hot").handsontable({ 
          data: res.data, 
          minSpareRows: 1, 
          startCols: 1, 
          minRows: 1, 
          minCols: 3, 
          columns: [ 
            {data: 1}, 
            {data: 2}, 
            {data: 3} 
          ], 
          colWidths: [160, 495, 60], 
          rowHeaders: false, 
          colHeaders: false, 
          contextMenu: false 
        }); 
      } 
    });

the above code runs in the "complete" callback of the jquery ui dialog and visually works fine, however I cannot change anything! 上面的代码在jquery ui对话框的“ complete”回调中运行,并且在外观上可以正常工作,但是我无法更改任何内容! When I try to edit the cells I can only "delete" the information in the grid fields, one character at a time, I cannot edit it positively only negatively, it's almost as if my entire keyboard is key press disabled. 当我尝试编辑单元格时,我只能一次删除一个字符中的网格字段中的信息,而不能只消极地对其进行正面编辑,这几乎就像整个键盘都被禁用了按键一样。 Has anyone ever seen this bug before and know a way around it? 有没有人曾经见过这个错误,并知道解决方法?

According to the Asker: 据问问者:

"It appears to be a jquery version issue "upgrading" (aka breaking :-/ 200 other things) the code appears to fix it (which works) illustrates this." “这似乎是一个jquery版本的问题,“正在升级”(又名:: / 200其他问题),似乎可以解决该问题的代码(有效)说明了这一点。”

So turned out to be a jQuery updating issue. 因此原来是jQuery更新问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM