Skip to content

Commit 0c6ead3

Browse files
Add type='button' to attrib button (#177)
Fixes #178 * Add type='button' to attrib button Prevents form from submitting when clicked * Add "prevent attribution from submiting" changelog * Added issue to "Prevent attrubtuin.." bug
1 parent 492bec5 commit 0c6ead3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
### 🐞 Bug fixes
1818

1919
- *...Add fixed bugs here...*
20+
- Prevented attribution button from submiting form (#178)
2021

2122
## 1.14.0
2223

src/ui/control/attribution_control.js

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class AttributionControl {
5757
this._container = DOM.create('div', 'mapboxgl-ctrl mapboxgl-ctrl-attrib');
5858
this._compactButton = DOM.create('button', 'mapboxgl-ctrl-attrib-button', this._container);
5959
this._compactButton.addEventListener('click', this._toggleAttribution);
60+
this._compactButton.type = 'button';
6061
this._setElementTitle(this._compactButton, 'ToggleAttribution');
6162
this._innerContainer = DOM.create('div', 'mapboxgl-ctrl-attrib-inner', this._container);
6263
this._innerContainer.setAttribute('role', 'list');

0 commit comments

Comments
 (0)