Skip to content

Initial Values Added to Masked Text Box Placeholder Overlayed #15

@ZoomPicard

Description

@ZoomPicard

Loading in an initial value into a text box with the library enabled will mean the placeholder is drawn under the text.

I tried to call various events to fix this issue but found a small change to the code based worked by hiding the placeholder if there is already a value in the text box:

createShell : function (t) {
  ....

    mask.appendChild(emphasis);
    //Don't add placeholder if data already exists
    if (t.value.length == 0) {
        mask.appendChild(placeholder);
    }

   ....

  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions