slickgrid ( nsunleo-slickgrid ) 4 解决点击不切换单元格的问题

slickgrid ( nsunleo-slickgrid ) 4 解决点击不切换单元格的问题

  上一次解决了列选择和区域选择冲突的问题,昨天太忙了,并且要陪小宝早点睡觉,就啥也没有赶上。今天上班面试、支持项目、Jdk修改成OpenJdk、Springboot1.5x 升版2.x最后两个微服务改造和部署,晚上还加了个班,解决其他项目组服务部署的问题。晚上回来继续完善nsunleo-slickgrid。

  今天要解决的问题是slickgrid点击不切换单元格,这个问题还挺难排查的,调试监控了一下handleClick事件,发现了点蹊跷的地方,但是依旧没有确认问题。

function handleClick(e) { 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 (e.target != document.activeElement || $(e.target).hasClass("slick-cell")) { setFocus(); } } var cell = getCellFromEvent(e); if (!cell || (currentEditor !== null && activeRow == cell.row && activeCell == cell.cell)) { return; } trigger(self.onClick, { row: cell.row, cell: cell.cell }, e); if (e.isImmediatePropagationStopped()) { return; } // stone 不用切换 (activeCell != cell.cell || activeRow != cell.row) && canCellBeActive(cell.row, cell.cell) if (canCellBeActive(cell.row, cell.cell)) { if (!getEditorLock().isActive() || getEditorLock().commitCurrentEdit()) { if (hasFrozenRows) { if ((!(options.frozenBottom) && (cell.row >= actualFrozenRow)) || (options.frozenBottom && (cell.row < actualFrozenRow)) ) { scrollRowIntoView(cell.row, false); setActiveCellInternal(getCellNode(cell.row, cell.cell)); } } } } }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zydxpw.html