Skip to content

Conversation

@shimizu-futa
Copy link

Description

This PR fixes an issue where the AdvancedMarker remains clickable even when the clickable prop is explicitly set to false.

As discussed in #904 , the current logic for gmpClickable incorrectly evaluates to true if clickable is defined as false. I have updated the logic to properly respect the boolean value of the prop.

Related Issue

Closes #904

Changes

  • Updated the gmpClickable calculation in advanced-marker.tsx to ensure it only evaluates to true when clickable is actually true (or when interaction callbacks are present).

How to Test

  1. Render an AdvancedMarker with clickable={false}.
  2. Verify that the gmp-clickable attribute is not applied (or set to false) in the DOM.
  3. Confirm that the marker no longer intercepts click events, allowing them to propagate to the map.

Copy link
Collaborator

@usefulthink usefulthink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks a lot.

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.

[Bug] AdvancedMarker remains clickable even when clickable is set to false

2 participants