Bing maps violation in Chrome (non-passive event listener to a scroll-blocking)

stramin meztuzeft 1 Reputation point
2022-04-18T16:46:45.473+00:00

I am getting these warnings in Chrome, it happens everywhere, even on every Bing samples page (https://samples.bingmapsportal.com/)

193942-screenshot-41.png

[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive.
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

It makes any website having any map refresh slower and slower.

This is the url to fix it provided by Chrome: https://chromestatus.com/feature/5745543795965952

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2022-04-19T21:40:37.597+00:00

    Hi straminmeztuzeft-3783

    I have the following answer from you from the Maps Engineering Team:
    The spec https://dom.spec.whatwg.org/#in-passive-listener-flag says "When set to true, options’s passive indicates that the callback will not cancel the event by invoking preventDefault()."

    This means that when a user’s map element is larger than browser window, the desirable behavior is mouse/touch events in map area only affect map itself. Without preventDefault, it would zoom the map and scroll the container element as well, causing a broken experience.

    The message is "By Design" and to avoid the message, ensure the map control is sized appropriately for your browser window.

    Sincerely,
    IoTGirl

    0 comments No comments