-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(events): check if event instanceof MouseEvent #5466
base: main
Are you sure you want to change the base?
feat(events): check if event instanceof MouseEvent #5466
Conversation
015fb5f
to
6370d49
Compare
6370d49
to
21c439e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5466 +/- ##
==========================================
+ Coverage 91.96% 91.99% +0.03%
==========================================
Files 282 282
Lines 39050 39086 +36
Branches 6855 6868 +13
==========================================
+ Hits 35911 35956 +45
+ Misses 3012 3001 -11
- Partials 127 129 +2 ☔ View full report in Codecov by Sentry. |
46694f8
to
1316f24
Compare
1316f24
to
640cb5c
Compare
640cb5c
to
b11844f
Compare
Tests were ok in local, I will check during the day why it fails. |
5a8bccd
to
58ed29e
Compare
check if event is instance of MouseEvent in map_event.ts same for event.ts Fix 5464
58ed29e
to
36eadfd
Compare
Should I update the bundle size test, or will a collaborator handle it? |
Please update the build size. Thanks! |
return pointableEvents[eventType] && (event instanceof MouseEvent || event instanceof WheelEvent); | ||
} | ||
|
||
export function isTouchableOrPointableType(eventType: string): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I fully see the value of this method, when used it is in an "if" statement that a simple else cover, doesn't it?
|
||
const pointableEvents = { | ||
dblclick: true, | ||
click: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Click can be achieved in touch devices, can't it?
Fix an error that could happen if a instance of Event is dispatched with MouseEvent types. This error has been encountered only when bots were crawling a website where a maplibre map was instanced.
Launch Checklist
CHANGELOG.md
under the## main
section.