修復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);        }    }});
相關文章
相關標籤/搜索