如果您发现其他版本也有此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); } }});
时间: 2024-11-05 21:55:03