Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control buttons should have type "button" #4861

Closed
Andekas opened this issue Jan 2, 2023 · 2 comments · Fixed by #4866
Closed

Control buttons should have type "button" #4861

Andekas opened this issue Jan 2, 2023 · 2 comments · Fixed by #4866
Labels
component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@Andekas
Copy link

Andekas commented Jan 2, 2023

Have you read the FAQ and checked for duplicate open issues?

Yes

What version of Shaka Player are you using?

4.3.0.

Can you reproduce the issue with our latest release version?

Yes

Can you reproduce the issue with the latest code from main?

Yes

Are you using the demo app or your own custom app?

Both

If custom app, can you reproduce the issue using our demo app?

Yes

What browser and OS are you using?

Chrome, Windows

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getConfiguration()?

What did you do?

Create video player inside a

. Click on a button on player controls.

What did you expect to happen?
Only what the button is supposed to do.

What actually happened?

Button (let's say start / pause) does what it does. But as this is a element without a type parameter, then if player is inside a form, form gets submitted also. For most browsers, the default type value is "submit". Player controls should have button type "button".

@Andekas Andekas added the type: bug Something isn't working correctly label Jan 2, 2023
@github-actions github-actions bot added this to the v4.4 milestone Jan 2, 2023
@WINOFFRG
Copy link
Contributor

WINOFFRG commented Jan 3, 2023

You are right, This can cause issues with forms. But I don't think this is a valid case even, because you can always redesign the things. But in case you are really looking to change the type on button, You can simply run a selector query on all the buttons inside shaka parents container or always modify the code from UI Library.

@Andekas
Copy link
Author

Andekas commented Jan 3, 2023

Sure, this is not a major issue and can be easily fixed / bypassed. But I still think that defining default button's type would be a good practice - and as far as I can see, there is no reason, why it has to be "submit". The less changes / custom solutions you have to do, the better.

@avelad avelad added component: UI The issue involves the Shaka Player UI priority: P2 Smaller impact or easy workaround labels Jan 3, 2023
@joeyparrish joeyparrish added priority: P3 Useful but not urgent and removed priority: P2 Smaller impact or easy workaround labels Jan 3, 2023
joeyparrish pushed a commit that referenced this issue Jan 3, 2023
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
joeyparrish pushed a commit that referenced this issue Jan 13, 2023
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
joeyparrish pushed a commit that referenced this issue Jan 13, 2023
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
joeyparrish pushed a commit that referenced this issue Jan 13, 2023
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
joeyparrish pushed a commit that referenced this issue Jan 13, 2023
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
Robloche pushed a commit to Robloche/shaka-player that referenced this issue Feb 8, 2023
…t#4866)

`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes shaka-project#4861
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Mar 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants