Skip to content

bug: ion-input-password-toggle causes label to float even when input is empty #29449

Closed

Description

@bodinaren

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When an <ion-input type="password" label-placement="floating"> is empty but has a ion-input-password-toggle the label is floating, something which normally only happens when the input has a value.

Expected Behavior

I expect the label to be placed the same as if the ion-input-password-toggle wasn't used so that all empty inputs looks the same.

Steps to Reproduce

The problem is immediately visible in the 3rd input in the stackblitz reproduction.

Code Reproduction URL

https://stackblitz.com/edit/angular-k1wdev?file=src%2Fapp%2Fexample.component.html

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (C:\Users\bodin\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/react 8.0.1

Capacitor:

Capacitor CLI : 5.5.1
@capacitor/android : 5.5.1
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1

Utility:

cordova-res : not installed globally
native-run : 1.7.3

System:

NodeJS : v20.11.1 (C:\Program Files\nodejs\node.exe)
npm : 10.7.0
OS : Windows 10 (actually 11, Ionic info reports wrong)

Additional Information

Given the comment here the error appears to be a known one, or at least an expected one, but has remained untouched for 6 months.

https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/input/input.tsx#L718-L721

Activity

  1. thetaPC commented on May 3, 2024

    @thetaPC
    Contributor

    Thank you for submitting the issue!

    I was able to confirm that this is an issue. We plan on allowing labels to float when slots are present. We'll update this when there's more information.

  2. added
    package: core
    type: bug
    on May 3, 2024
  3. removed their assignment
    on May 3, 2024
  4. yannisvanlaerhoven3 commented on May 29, 2024

    @yannisvanlaerhoven3

    Would love a fix 🙏

  5. ruettenm commented on Aug 19, 2024

    @ruettenm

    The issue is still open. Do you already have a plan when it will be fixed?

  6. ErikOnBike commented on Oct 18, 2024

    @ErikOnBike

    This seems to be the same issue as described in #28665 (except this one is more specific). I added a PR for the other issue. Hope it gets picked up (soonish).

  7. tanner-reits commented on Nov 5, 2024

    @tanner-reits
    Contributor

    Closing as duplicate of #28665

  8. ionitron-bot commented on Dec 5, 2024

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  9. locked and limited conversation to collaborators on Dec 5, 2024
  10. added a commit that references this issue on Aug 14, 2026
    a292789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions