react-google-maps-api icon indicating copy to clipboard operation
react-google-maps-api copied to clipboard

onClick not firing in 'weekly' google maps api channel

Open blueo opened this issue 4 years ago • 3 comments

Please provide an explanation

Markers with an onClick handler are not firing the on click event when using the 'weekly' Maps api channel. This might be on google's side but thought it would be good to flag incase it was an API change of some kind

Your Environment

os: codepen

node --version codepen

react version 17.0.1

webpack version N/A

@babel version (whatever codepen uses)

@react-google-maps/api version 2.4.1

How is it behave?

the onClick handler does not get triggered when clicking a marker

How should it behave correctly?

the onClick handler should be triggered when clicking on a marker

basic implementation of incorrect behavior in codesandbox.com

https://codepen.io/blueo/pen/jOwgxdM if you uncomment the quarterly version/change weekly to quarterly then clicking on the Marker will trigger the alert.

blueo avatar Oct 06 '21 22:10 blueo

This is still an issue! The quarterly version is changing on the 17th November to 3.46 where this issue is being seen.

I am not seeing this problem in a project that doesn't use this library.

lukeinage avatar Nov 14 '21 14:11 lukeinage

I'm seeing a very similar issue in my create-react-app since 3.46 went into weekly in early September (I'm pinned at 3.45 as a temporary workaround). Markers are no longer draggable, i.e. for example with:

<Marker draggable={true} 
        onDragStart={primaryDragStart} 
        onDragEnd={primaryDragEnd}
        onDrag={primaryDrag}>

none of the drag event related callbacks are called when using 3.46. They all work fine with 3.45 or earlier.

Seems like a Google regression that they're not going to fix or acknowledge (see https://issuetracker.google.com/issues/198562471) - there was no change to my code base other 3.46 being released when this started happening.

stephent avatar Nov 15 '21 00:11 stephent

Seems this is due to CSS conflicts - see https://github.com/JustFly1984/react-google-maps-api/issues/2906#issuecomment-973058108

stephent avatar Nov 18 '21 01:11 stephent