WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

<sl-button> value is cleared with form reset #2524

@lbird-mma

Description

@lbird-mma

Describe the bug

In a form I have some submit sl-buttons, with a name/value pair, like
<sl-button type='submit' name='rtype' value='month'>List by month</sl-button>

Their values are hardcoded, which means they are already in in the HTML source and not set by javascript.

When using a form reset button, <sl-button type='reset'>Reset</sl-button>, the value of the button is cleared.
This should not happen as a form reset means all values are reset to their initial state.

It also happens with type='button' buttons, see the demo.

Demo

https://codepen.io/lbird-mma/pen/PwZJrEa

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThings that aren't working right in the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions