2013-08-23 35 views
11

我已经根据SlickGrid and Text Selection设置了enableTextSelectionOnCells。Slickgrid单元格文本选择在Chrome或Firefox中无法正常工作

我对此并不满意。

单元文本被选中时表现不佳。有时只要选择完成,选择就会消失。只有在极少数情况下才有效。

有没有人遇到过这个问题?

我试过这个在Firefox和Chrome上。

重现:

  1. git clone [email protected]:mleibman/SlickGrid.git
  2. examples文件夹
  3. 编辑example1-simple.html
  4. 添加enableTextSelectionOnCells: true期权
  5. 打开example1-simple.html在FF /铬
  6. 尝试选择一个单元格值为

仅供参考,我在Ubuntu上运行,如果它应该有所作为。

+1

我对铬有同样的问题。 – l46kok

+0

我遇到同样的问题。 – Mutant

回答

2

此问题已在Github上解决。你只需要修改slick.gird.js。在行号2270附近,您只需添加“options.editable & &”。希望这个帮助。

if (!currentEditor) { 
    // if this click resulted in some cell child node getting focus, 
    // don't steal it back - keyboard events will still bubble up 
    // IE9+ seems to default DIVs to tabIndex=0 instead of -1, so check for cell clicks directly. 
    if (options.editable && e.target != document.activeElement || $(e.target).hasClass("slick-cell")) { 
     setFocus(); 
    } 
    } 
+0

谢谢你。在很久以前放弃之后,我完全忘记了这一点 –

相关问题