zefoy / ngx-perfect-scrollbar

Angular wrapper library for the Perfect Scrollbar
MIT License
521 stars 116 forks source link

PerfectScrollbar + Google Maps problem #224

Open pcandido opened 5 years ago

pcandido commented 5 years ago

Google Maps API works properly with native scrollbar, i.e. when scrolling the page, the 'zoom' function is not called, even if the cursor is over the map. In this case, GMaps ask the user to press the Ctrl key.

Using PerfectScrollbar, it does not happens. However, I can 'force' GMaps to ask that to the user:

        this.map = new google.maps.Map(this.gmapElement.nativeElement, {
            gestureHandling: 'cooperative'
        });

It works fine for GMaps, however, if I press Ctrl key to use the zoom function, the page scrolls. The issue is to not scroll if the Ctrl key is pressed.

Note that, even there is no Map in the page, the Ctrl key is interpreted by the browser as zoom for the page, so I guess the scroll should be blocked in any case, if the Ctrl key is pressed.

sconix commented 5 years ago

Good point, even though I think it should PS that handles this I could add this to this library since PS developer has been silent for a while now. But I think you still should also make a issue to PS about this.

pcandido commented 5 years ago

The same occurs when handling the maps with two fingers on mobile devices.

Fredyy90 commented 4 years ago

@sconix @pcandido Hey guys, i just ran into the same problem. are there any updates to this issue?