diff --git a/js/ui/control/geolocate.js b/js/ui/control/geolocate.js index dd211a70368..337c5b84fea 100644 --- a/js/ui/control/geolocate.js +++ b/js/ui/control/geolocate.js @@ -38,6 +38,7 @@ Geolocate.prototype = util.inherit(Control, { this._container.addEventListener('contextmenu', this._onContextMenu.bind(this)); this._geolocateButton = DOM.create('button', (className + '-icon ' + className + '-geolocate'), this._container); + this._geolocateButton.type = 'button'; this._geolocateButton.addEventListener('click', this._onClickGeolocate.bind(this)); return container; }, diff --git a/js/ui/control/navigation.js b/js/ui/control/navigation.js index 4128e8fbe14..53e4ffdbce4 100644 --- a/js/ui/control/navigation.js +++ b/js/ui/control/navigation.js @@ -85,6 +85,7 @@ Navigation.prototype = util.inherit(Control, { _createButton: function(className, fn) { var a = DOM.create('button', className, this._container); + a.type = 'button'; a.addEventListener('click', function() { fn(); }); return a; }, diff --git a/js/ui/popup.js b/js/ui/popup.js index 46bd8d55254..08564ea9f1b 100644 --- a/js/ui/popup.js +++ b/js/ui/popup.js @@ -172,6 +172,7 @@ Popup.prototype = util.inherit(Evented, /** @lends Popup.prototype */{ if (this.options.closeButton) { this._closeButton = DOM.create('button', 'mapboxgl-popup-close-button', this._content); + this._closeButton.type = 'button'; this._closeButton.innerHTML = '×'; this._closeButton.addEventListener('click', this._onClickClose); }