我已经根据 SlickGrid and Text Selection 设置了 enableTextSelectionOnCells .
我对此并不感到高兴。
单元格文本以不良行为被选中。有时,一旦完成选择,选择就会消失。只有在极少数情况下它才起作用。
有没有人遇到过这个问题?
我已经在 Firefox 和 Chrome 上试过了。
重现:
git clone git@github.com:mleibman/SlickGrid.git
examples
文件夹 example1-simple.html
enableTextSelectionOnCells: true
在选项中 example1-simple.html
在 FF/Chrome 仅供引用,如果它有什么不同,我正在 Ubuntu 上运行。
最佳答案
这个问题已经在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();
}
}
关于Slickgrid 单元格文本选择在 Chrome 或 Firefox 中无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18397036/