Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ToHold
Copy link
Contributor

@ToHold ToHold commented Feb 5, 2025

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

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch from 6370d49 to 21c439e Compare February 6, 2025 09:00
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.97%. Comparing base (a99fe93) to head (1911789).
Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5466   +/-   ##
=======================================
  Coverage   91.96%   91.97%           
=======================================
  Files         282      282           
  Lines       39050    39086   +36     
  Branches     6855     6868   +13     
=======================================
+ Hits        35911    35948   +37     
+ Misses       3012     3010    -2     
- Partials      127      128    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch 3 times, most recently from 46694f8 to 1316f24 Compare February 6, 2025 10:08
@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch from 1316f24 to 640cb5c Compare February 10, 2025 13:57
@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch from 640cb5c to b11844f Compare February 12, 2025 16:31
@ToHold
Copy link
Contributor Author

ToHold commented Feb 13, 2025

Tests were ok in local, I will check during the day why it fails.

@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch 3 times, most recently from 58ed29e to 36eadfd Compare February 13, 2025 13:06
@ToHold
Copy link
Contributor Author

ToHold commented Feb 13, 2025

Should I update the bundle size test, or will a collaborator handle it?

@HarelM
Copy link
Collaborator

HarelM commented Feb 13, 2025

Please update the build size. Thanks!

check if event is instance of MouseEvent in map_event.ts
same for event.ts

Fix 5464
@ToHold ToHold force-pushed the feat-check-if-event-instanceof-MouseEvent branch from 36eadfd to 1911789 Compare February 19, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(events): check if event instanceof MouseEvent for events type 'mouseover' 'mouseout' etc
3 participants