修复Extjs5.1.4表格设置enableTextSelection: true之后,文本仍然不能选择的BUG

Posted 拉风的帅猫

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了修复Extjs5.1.4表格设置enableTextSelection: true之后,文本仍然不能选择的BUG相关的知识,希望对你有一定的参考价值。

如果您发现其他版本也有此BUG,可参照此方式进行修复,源代码中多了一句拦截mousedown事件的代码mousedownEvent.preventDefault()造成的。
Ext.define(‘Ext.override.grid.NavigationModel‘,{
override:‘Ext.grid.NavigationModel‘,
onCellMouseDown: function(view, cell, cellIndex, record, row, recordIndex, mousedownEvent) {
var parentEvent = mousedownEvent.parentEvent,
targetComponent = Ext.Component.fromElement(mousedownEvent.target, cell),
column = mousedownEvent.position && mousedownEvent.position.column,
cellEditing = view.grid.findPlugin(‘cellediting‘);

if (targetComponent && targetComponent.isFocusable && targetComponent.isFocusable()) {
if (!cellEditing || !cellEditing.editing) {
targetComponent.focus();
}
if (column && column.stopSelection !== false) {
return;
}
}
if (!parentEvent || parentEvent.type !== ‘touchstart‘) {
this.setPosition(mousedownEvent.position, null, mousedownEvent);
}
}
});




















以上是关于修复Extjs5.1.4表格设置enableTextSelection: true之后,文本仍然不能选择的BUG的主要内容,如果未能解决你的问题,请参考以下文章

如何设置表格中的行高以在 python-docx 中修复?

修复表格标题并使表格主体在 React 中滚动

基于OpenCV修复表格缺失的轮廓--如何识别和修复表格识别中的虚线

我的excel2016打开以后是空白页,要点击编辑栏之后才能显示内容,怎么修复?

打开excel表格时,跳出小框,框内提示如下,请帮忙解决。

我的Excel表格打开就乱码了,请问该怎么修复