Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
v1.2.7: Stop propagation on map click, Clear focus after deactivating…
Browse files Browse the repository at this point in the history
… coordinate search
  • Loading branch information
Phocacius committed Apr 27, 2023
1 parent c02cd3f commit 7fdb6de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.7
* Stop propagation on map click to prevent e.g. feature info from triggering as well
* Clear focus after deactivating coordinate search

## 1.2.6
* Fix errors processing invalid srs list entries

Expand Down
4 changes: 3 additions & 1 deletion Resources/public/mapbender.element.coordinatesutility.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@
if (!widget.isPopUpDialog) {
var coordinateSearchButton = $('.coordinate-search', this.element);

coordinateSearchButton.on('click', function () {
coordinateSearchButton.on('click', function (e) {
var isActive = $(this).hasClass('active');

if (isActive) {
widget.deactivate();
this.blur();
} else {
widget.activate();
}
Expand Down Expand Up @@ -307,6 +308,7 @@
if (!this.mapClickActive) {
return;
}
event.stopPropagation();
var x = this.lon = data.coordinate[0];
var y = this.lat = data.coordinate[1];
var mapSrs = this.mbMap.getModel().getCurrentProjectionCode();
Expand Down

0 comments on commit 7fdb6de

Please sign in to comment.