Skip to content

Commit

Permalink
Google Map: Disable infoWindow focus so it remains on search input.
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Oct 11, 2023
1 parent db4e210 commit a60b2fe
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ export function assignMarkerReferences( map, maps, wpEvents, rawIcon ) {
*/
function openInfoWindow( infoWindow, map, markerObject, rawMarker ) {
infoWindow.setContent( getElementHTML( <MarkerContent { ...rawMarker } /> ) );
infoWindow.open( map, markerObject );
infoWindow.open( {
anchor: markerObject,
map: map,
shouldFocus: false, // Don't steal focus from the search <input>.
} );
}

/**
Expand Down

0 comments on commit a60b2fe

Please sign in to comment.