Skip to content

fix(google-maps): update right-click event to use contextmenu for Adv… #30523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ describe('MapAdvancedMarker', () => {
expect(addSpy).toHaveBeenCalledWith('mouseout', jasmine.any(Function));
expect(addSpy).toHaveBeenCalledWith('mouseover', jasmine.any(Function));
expect(addSpy).toHaveBeenCalledWith('mouseup', jasmine.any(Function));
expect(addSpy).toHaveBeenCalledWith('rightclick', jasmine.any(Function));
expect(addSpy).toHaveBeenCalledWith('contextmenu', jasmine.any(Function));
expect(addSpy).not.toHaveBeenCalledWith('drag', jasmine.any(Function));
expect(addSpy).not.toHaveBeenCalledWith('dragend', jasmine.any(Function));
expect(addSpy).not.toHaveBeenCalledWith('dragstart', jasmine.any(Function));
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ export class MapAdvancedMarker
* This event is fired when the AdvancedMarkerElement is right-clicked.
*/
@Output() readonly mapRightclick: Observable<google.maps.MapMouseEvent> =
this._eventManager.getLazyEmitter<google.maps.MapMouseEvent>('rightclick');
this._eventManager.getLazyEmitter<google.maps.MapMouseEvent>('contextmenu');

/**
* This event is repeatedly fired while the user drags the AdvancedMarkerElement.