Skip to content

Support default values (or programatic population of values) on input fields #14

@deweydb

Description

@deweydb

Right now this script just takes the input placeholder by default, even if the input has value="" set to something.

I changed:
this.toggle.innerHTML = this.elOriginal.getAttribute( 'placeholder' );

to:
this.toggle.innerHTML = this.elOriginal.value.trim() !== '' ? this.elOriginal.value : this.elOriginal.getAttribute( 'placeholder' );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions