Skip to content

fix(ag-ui): advanced markers ignore clicks — set gmpClickable#749

Merged
blove merged 1 commit into
mainfrom
blove/ag-ui-marker-clickable
Jul 6, 2026
Merged

fix(ag-ui): advanced markers ignore clicks — set gmpClickable#749
blove merged 1 commit into
mainfrom
blove/ag-ui-marker-clickable

Conversation

@blove

@blove blove commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Marker clicks on the App-mode map did nothing (no info window / focus / Remove). Regression from the AdvancedMarkerElement migration: legacy Marker is clickable by default, AdvancedMarkerElement is not — without gmpClickable: true it never fires click/gmp-click, so (mapClick) stays silent. The "use gmp-click" console hint was the symptom.

Fix: pass { gmpClickable: true } via the marker [options] (+7 lines).

Verified: live in Chrome (markers report gmpClickable=true, click opens the info window with Remove), lint 0 errors, unit ✓, build ✓ against post-#747 main.

🤖 Generated with Claude Code

Regression from the AdvancedMarkerElement migration: the legacy
google.maps.Marker was clickable by default, but AdvancedMarkerElement is
NOT — without gmpClickable it never fires click/gmp-click, so the wrapper's
(mapClick) output stays silent and the marker info window (focus + Remove)
never opens. Pass { gmpClickable: true } via the marker [options].

Found by Brian during live review; verified live in Chrome — markers report
gmpClickable=true and clicking opens the info window. (The "use gmp-click"
console hint was this bug's symptom, not noise.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jul 6, 2026 3:11pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 37s —— View job


Code Review

  • Gather context
  • Read changed file and diff
  • Post review findings

Verdict: LGTM

The fix is correct and minimal. AdvancedMarkerElement silently drops all pointer events unless gmpClickable: true is set — the legacy Marker was clickable by default, so this is an easy-to-miss migration gotcha. Setting it once on a shared readonly options object is the right approach.

A few quick observations:

Correctness — The root cause diagnosis is accurate. Without gmpClickable, the underlying element never fires click/gmp-click, so @angular/google-maps's (mapClick) output stays permanently silent regardless of what the template binds.

No binding conflictsadvancedMarkerOptions only carries gmpClickable: true; it doesn't re-declare position, content, or title, so there's no risk of the [options] merge shadowing the per-marker inputs.

Shared object is safe — All markers sharing the same options reference is correct here since gmpClickable is uniform and the object is never mutated after construction.

Comment quality — The explanatory comment at the property declaration is worth keeping; this is a non-obvious platform behaviour that would trip up anyone unfamiliar with the AdvancedMarkerElement migration story.

No issues found.

@blove blove merged commit 502a062 into main Jul 6, 2026
28 checks passed
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.

1 participant