siemens / ix

Siemens Industrial Experience is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.
https://ix.siemens.io/
MIT License
197 stars 65 forks source link

Input padding keeps increasing after deleting input text #837

Closed TDaniel-evo closed 11 months ago

TDaniel-evo commented 11 months ago

What happened?

I have a text input with icon (https://ix.siemens.io/docs/controls/input#with-icon). This input is part of a form and there is form validation on in. If I enter text in the input and delete it with backspace then the values of background-position-x and padding-left are increasing on the input: image

What type of frontend frameware are you seeing the problem on?

Angular

Which version of iX do you use?

2.0.1

Code to produce this issue.

...
<div class="form-group">
      <label for="iemPassword" class="form-label">
        {{ "iemLoginPasswordLabel" | translate }}
      </label>

      <ix-input-group>
        <input
          id="iemPassword"
          formControlName="iemPassword"
          placeholder="Enter text here"
          type="password"
          (keydown.enter)="onConfirm()"
          appCustomValidator
        />
        <span slot="input-end">
          <ix-icon
            name="eye"
            size="16"
            (click)="toggleIemPasswordInputType($event)"
          ></ix-icon>
        </span>
        <div
          *ngIf="loginForm.controls.iemPassword.errors?.required"
          class="invalid-feedback"
        >
          {{ "iemLoginPasswordFormErrorRequired" | translate }}
        </div>
      </ix-input-group>
    </div>
...
danielleroux commented 11 months ago

Cannot reproduce with latest version: https://stackblitz.com/edit/ne22aj?file=src%2Fapp%2Fvalidation.ts

🚢 in 2.0.3 (#803)

TDaniel-evo commented 11 months ago

Thank you! I checked with 2.0.3 and the padding does not increases but it's too small now: image

It is also visible in your stackblitz: image

danielleroux commented 11 months ago

Yep! 😵‍💫 Already found the problem. #838