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

The default value is not shown completely with the "text-overflow: ellipsis" style #2828

Open
Myshanyatko opened this issue Nov 14, 2024 · 0 comments
Assignees
Milestone

Comments

@Myshanyatko
Copy link

If input has

  • inputMask
  • style "text-overflow: ellipsis"
  • long (not fitting into the input) default value

Input doesn't show the value until you click on it. If the value is shorter, only part of it is shown (instead of '12345678901234567890...' here '901234567890...').

import Inputmask from 'inputmask';

const appDiv = document.getElementById('app');
appDiv.innerHTML = `
      <h1>Bug ellipsis</h1>
      <p>Click on input</p>
      <input 
        id="input" 
        style="text-overflow: ellipsis"
      />`;

var input1 = document.getElementById('input');

input.value = '1234567890123456789012345678901234567890123';

new Inputmask({ mask: '9{*}' }).mask(input1);

https://stackblitz.com/edit/js-inputmask-kpr99k?file=index.js
OS: Windows
Browser : Google
Inputmask version: 5.0.9

@RobinHerbots RobinHerbots self-assigned this Jan 14, 2025
@RobinHerbots RobinHerbots pinned this issue Jan 14, 2025
@RobinHerbots RobinHerbots added this to the 5.0.10 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants