8000 Fix broken search button in openlayers 6 by Autre31415 · Pull Request #194 · Dominique92/ol-geocoder · GitHub
[go: up one dir, main page]

Skip to content

Fix broken search button in openlayers 6 - #194

Merged
jonataswalker merged 2 commits into
Dominique92:masterfrom
Autre31415:ol6-fix
Oct 9, 2019
Merged

jonataswalker merged 2 commits into
Dominique92:masterfrom
Autre31415:ol6-fix

Conversation

@Autre31415
@Autre31415 Autre31415 commented Oct 3, 2019 •
Copy link
Copy Markdown
Contributor

After investigating this issue it turns out the root of the problem is that a click event on an ol-control button will bubble up to the map container element in openlayers 6, while it did not in previous versions.

The solution I came up for the time being adds a stopPropagation() to the glass button as well as binding a new click event on the related input that does the same to prevent map click event from firing unintentionally.

This behavior in openlayers may be considered a bug on their end, judging by issues that appear tangentially related such as openlayers/openlayers#10091.

Closes #193

@jonataswalker
jonataswalker merged commit c59f984 into Dominique92:master Oct 9, 2019
@jonataswalker
Copy link
Copy Markdown
Collaborator

Thanks @Autre31415

@Autre31415
Autre31415 deleted the ol6-fix branch November 1, 2019 15:19
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.

Search button broken in openlayers 6

2 participants

0