Skip to content

Commit d381582

Browse files
committed
prevent buttons from submitting forms
1 parent 3d64d42 commit d381582

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

dist/APlayer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/APlayer.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aplayer",
3-
"version": "1.5.8",
3+
"version": "1.5.9",
44
"description": "Wow, such a beautiful html5 music player",
55
"main": "dist/APlayer.min.js",
66
"scripts": {

src/APlayer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
console.log("\n %c APlayer 1.5.8 %c http://aplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");
1+
console.log("\n %c APlayer 1.5.9 %c http://aplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");
22

33
require('./APlayer.scss');
44

@@ -156,7 +156,7 @@ class APlayer {
156156
let eleHTML = `
157157
<div class="aplayer-pic" ${(this.music.pic ? (`style="background-image: url('${this.music.pic}');"`) : ``)}>
158158
<div class="aplayer-button aplayer-play">
159-
<button class="aplayer-icon aplayer-icon-play">`
159+
<button type="button" class="aplayer-icon aplayer-icon-play">`
160160
+ this.getSVG('play')
161161
+ ` </button>
162162
</div>
@@ -183,7 +183,7 @@ class APlayer {
183183
- <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
184184
</span>
185185
<div class="aplayer-volume-wrap">
186-
<button class="aplayer-icon aplayer-icon-volume-down" ${this.isMobile ? 'style="display: none;"' : ''}>`
186+
<button type="button" class="aplayer-icon aplayer-icon-volume-down" ${this.isMobile ? 'style="display: none;"' : ''}>`
187187
+ this.getSVG('volume-down')
188188
+ ` </button>
189189
<div class="aplayer-volume-bar-wrap">
@@ -192,10 +192,10 @@ class APlayer {
192192
</div>
193193
</div>
194194
</div>
195-
<button class="aplayer-icon aplayer-icon-mode">`
195+
<button type="button" class="aplayer-icon aplayer-icon-mode">`
196196
+ this.getSVG(this.mode)
197197
+ ` </button>
198-
${(this.multiple ? `<button class="aplayer-icon aplayer-icon-menu">`
198+
${(this.multiple ? `<button type="button" class="aplayer-icon aplayer-icon-menu">`
199199
+ this.getSVG('menu')
200200
+ ` </button>` : ``)}
201201
</div>
@@ -485,7 +485,7 @@ class APlayer {
485485
this.button.innerHTML = '';
486486
setTimeout(() => {
487487
this.button.innerHTML = `
488-
<button class="aplayer-icon aplayer-icon-pause">`
488+
<button type="button" class="aplayer-icon aplayer-icon-pause">`
489489
+ this.getSVG('pause')
490490
+ ` </button>`;
491491
}, 100);
@@ -521,7 +521,7 @@ class APlayer {
521521
this.button.innerHTML = '';
522522
setTimeout(() => {
523523
this.button.innerHTML = `
524-
<button class="aplayer-icon aplayer-icon-play">`
524+
<button type="button" class="aplayer-icon aplayer-icon-play">`
525525
+ this.getSVG('play')
526526
+ ` </button>`;
527527
}, 100);

0 commit comments

Comments
 (0)