Browse Source

Merge pull request #698 from cdswyda/fix/cursorPos

fix(cursorPos): 修复 event.target 为 document 等情况下代码报错的问题
master
Dushusir 4 years ago
committed by GitHub
parent
commit
e1c29f2ce0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/global/cursorPos.js

2
src/global/cursorPos.js

@ -51,7 +51,7 @@ function hideMenuByCancel(event){
// Right-click the menu in the title bar, and click on the elements whose class is luckysheet-cols-rows-shift-left and luckysheet-cols-rows-shift-right will trigger the hiding of the menu bar. It should be prohibited. Exclude these two elements. There may be more Other elements will also jump here for more testing // Right-click the menu in the title bar, and click on the elements whose class is luckysheet-cols-rows-shift-left and luckysheet-cols-rows-shift-right will trigger the hiding of the menu bar. It should be prohibited. Exclude these two elements. There may be more Other elements will also jump here for more testing
if(event.target.classList.contains('luckysheet-cols-rows-shift-left') || event.target.classList.contains('luckysheet-cols-rows-shift-right')){ if(event.target.classList && (event.target.classList.contains('luckysheet-cols-rows-shift-left') || event.target.classList.contains('luckysheet-cols-rows-shift-right'))){
return; return;
} }

Loading…
Cancel
Save