我们项目中使用了spreadjs的15版本,并使用了wujie集成了微应用,现在发现,如果焦点在一个禁用的单元格中,在微应用中切换到基座或其他应用时,spreadjs仍然认为焦点在单元格中,并对非spreadjs中的可输入输入框进行keydown事件进行了劫持,会造成按下BackSpace(退格键)按键时,文字删除不掉,没有反应。
在浏览器中输入了如下代码,对keydown的preventDefault()函数进行监控
- const originPreventDefault = KeyboardEvent.prototype.preventDefault;
- KeyboardEvent.prototype.preventDefault = function () {
- originPreventDefault.call(this);
- debugger;
- };
复制代码 发现触发的位置位于spreadjs,相关堆栈如下
现在希望spreadjs开发者能够在keydown事件中加一个检测,如果触发事件的元素是spreadjs的输入框,再进行拦截,即不拦截其他输入框。
项目中使用的package.json如下:
"@grapecity/spread-sheets": "~15.2.5",
"@grapecity/spread-excelio": "~15.2.5",
"@grapecity/spread-sheets-charts": "~15.2.5",
"@grapecity/spread-sheets-pdf": "~15.2.5",
"@grapecity/spread-sheets-print": "~15.2.5",
"@grapecity/spread-sheets-resources-zh": "~15.2.5",
"@grapecity/spread-sheets-designer": "~15.2.5",
"@grapecity/spread-sheets-designer-resources-cn": "~15.2.5",
"@grapecity/spread-sheets-designer-react": "~15.2.5",
"@grapecity/spread-sheets-react": "~15.2.5",
"@grapecity/spread-sheets-barcode": "~15.2.5",
"@grapecity/spread-sheets-shapes": "~15.2.5",
"@grapecity/spread-sheets-languagepackages": "~15.2.5",
"@grapecity/spread-sheets-tablesheet": "~15.2.5",
"@grapecity/spread-sheets-pivot-addon": "~15.2.5",
"@grapecity/spread-sheets-slicers": "~15.2.5"
|