Skip to content

(Sometimes) Only the first character of the Placeholder is shown #1498

@viktorsmari

Description

@viktorsmari

I did:

  • Search for if my issue has already been submitted
  • Make sure I'm reporting something precise that needs to be fixed
  • Give my issue a descriptive and concise title
  • Create a minimal working example on JsFiddle or Codepen
    (or gave a link to a demo on the Selectize docs)
  • Indicate precise steps to reproduce in numbers and the result,
    like below

Sometimes only half of the first character is visible. See screenshot:
2019-08-06_22-14-56

This happens in Chrome, Firefox, and on mobile Android Chrome.

This is due to the following width: 4px being added to the input. If I disable the width in the inspector, all the text becomes visible again (not only the first letter).

From the inspector:

<input 
  type="select-one" 
  autocomplete="off" tabindex="7" 
  id="material_inventory_id-selectized" 
  placeholder="Please select" 
  required="" 
  style="width: 4px; opacity: 1; position: relative; left: 0px;">

I suspect this has something to do with Turbolinks / Rails 5.2
The issue only occurs when I navigate around, it seems at random.
If I refresh the affected page, it is fixed.

Steps to reproduce:

  1. Since this happens sometimes, you need to copy the stiles above.
  2. Looks like the 4px is happening in more examples: https://www.google.es/search?q=%22width%3A+4px%3B+opacity%3A+1%3B+position%3A+relative%3B+left%3A+0px%3B%22&oq=%22width%3A+4px%3B+opacity%3A+1%3B+position%3A+relative%3B+left%3A+0px%3B%22&aqs=chrome..69i57.400j0j7&client=ubuntu&sourceid=chrome&ie=UTF-8

Expected result: The Placeholder should be visible.
Actual result: Only the first characther of the Placeholder is visible.

Related: #1368

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions