garfish
garfish copied to clipboard
event instanceof MouseEvent === false
Describe the bug
window.onload = function () {
let root = document.querySelector('#root');
root.addEventListener('click',(event)=>{
console.log(event instanceof MouseEvent); // result is false
// expect is true
});
}
Reproduction
none
Used Package Manager
pnpm
System Info
System:
OS: macOS 12.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 46.05 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
Browsers:
Chrome: 102.0.5005.61
Safari: 15.5
npmPackages:
@garfish/es-module: workspace:* => 1.7.2
garfish: workspace:* => 1.7.2
Validations
- [X] Read the docs.
- [X] Read the common issues list.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Garfish issue and not a framework-specific issue.
- [X] The provided reproduction is a minimal reproducible example of the bug.