1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-17 21:18:27 +02:00

fix(TextTrackSetting): Do not use default button type. (#5512)

The default button type is "submit" which triggers a form submit. Thus
if videojs is embedded in a form element the button triggers a form
submit.

This is the same problem with same solution as discussed in https://github.com/videojs/video.js/issues/2470
This commit is contained in:
Michael Nowack 2018-10-22 20:56:50 +02:00 committed by Gary Katsevman
parent 46e3ef0951
commit dfcfa45be1

View File

@ -464,11 +464,11 @@ class TextTrackSettings extends ModalDialog {
return createEl('div', {
className: 'vjs-track-settings-controls',
innerHTML: [
`<button class="vjs-default-button" title="${defaultsDescription}">`,
`<button type="button" class="vjs-default-button" title="${defaultsDescription}">`,
this.localize('Reset'),
`<span class="vjs-control-text"> ${defaultsDescription}</span>`,
'</button>',
`<button class="vjs-done-button">${this.localize('Done')}</button>`
`<button type="button" class="vjs-done-button">${this.localize('Done')}</button>`
].join('')
});
}