Skip to content

Unclickable polygons on bottom right corner  #1071

Open
@dnclain

Description

@dnclain

Describe the bug 🐛

When used in chakra-ui modal, the div created dynamically make clicks on map polygons impossible.
No problem occurred with the same div on non modal containers.

To Reproduce 🔍

Steps to reproduce the behavior:

  1. Create a chakra-ui modal
  2. Place the google map on it
  3. Add polygons with an onclick event.
  4. Try to click on polygons in the right bottom corner, where the div apparears

Expected behavior 💭

As on non modal containers, polygons should receive onclick event

Screenshots 🖥

Environment:

  • OS: Any (macOS, Windows, Linux)
  • Browser: Any (Firefox, edge, chrome, safari)
  • Version : The last one as of 11/2/2021.

Additional context

When changing the css position to 'fixed' in google_map_markers.js, the div is no more in the viewport and the problem disappears.

const mainStyle: React.CSSProperties = {
	width: '100%',
	height: '100%',
	left: 0,
	top: 0,
	margin: 0,
	padding: 0,
	position: 'fixed' // 'absolute' introduces click error
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions