Skip to content

bug: input floating label is always floating when using start/end slots #28665

Closed

Description

@rulaman123

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

ion-input with labelPlacement="floating" not working as intended with slotted ion-button inside. The label is fixed on top even with pristine input.

input bug

The label of the first ion-input without slotted button is correct.

Expected Behavior

When ion-input has or loses focus the label should change its position.

Steps to Reproduce

  1. create an ion-input wit labelPlacement="floating"
  2. create an ion-button with slot="end" inside

Code Reproduction URL

No response

Ionic Info

Ionic:
Ionic CLI : 7.1.5
Ionic Framework : @ionic/angular 7.6.0
@angular-devkit/build-angular : 16.2.8
@angular-devkit/schematics : 16.2.8
@angular/cli : 16.2.8
@ionic/angular-toolkit : 10.0.0

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.4

System:
NodeJS : v20.10.0
npm : 10.2.3
OS : Windows 10

Additional Information

No response

Activity

  1. changed the title [-]bug: ion-input with labelPlacement floating not working with slots[/-] [+]bug: input floating label is always floating when using start/end slots[/+] on Dec 7, 2023
  2. added
    package: core
    type: bug
    on Dec 7, 2023
  3. richardliebmann commented on Apr 19, 2024

    @richardliebmann

    +1

  4. 5uper commented on Apr 26, 2024

    @5uper

    +1

  5. Fearcoder commented on May 12, 2024

    @Fearcoder

    +1

  6. hienpvptit commented on May 18, 2024

    @hienpvptit

    +1

  7. VerburgtJimmy commented on May 21, 2024

    @VerburgtJimmy

    Is there someone from the team who is able to look at this issue? The issue persists in ionic 8 when i have my code like this:

    <ion-input label="Password" labelPlacement="floating" type="password> 
           <ion-input-password-toggle slot="end"></ion-input-password-toggle>
    </ion-input>
    

    Just looked into the code and it seems there is already a TODO for this issue. So it is just a question of when it is done:

    * TODO(FW-5592): Remove hasStartEndSlots condition
    */
    const labelShouldFloat =
    labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));

  8. VerburgtJimmy commented on May 29, 2024

    @VerburgtJimmy

    +1

  9. YounesAmalouSSCA commented on Jul 23, 2024

    @YounesAmalouSSCA

    +1

  10. beliven-davide-lorigliola commented on Aug 7, 2024

    @beliven-davide-lorigliola

    +1

  11. added a commit that references this issue on Oct 18, 2024
    4c54cf7
  12. gerichyura commented on Dec 12, 2024

    @gerichyura

    +1

  13. 14 remaining items

  14. RicardoJCh commented on Jul 9, 2025

    @RicardoJCh

    +1

  15. simb commented on Aug 29, 2025

    @simb

    +1

  16. temelkovgjoko commented on Sep 2, 2025

    @temelkovgjoko

    +1

  17. kyawswarthwin commented on Sep 14, 2025

    @kyawswarthwin

    The bug still hasn’t been fixed up to September 14, 2025.

  18. soloVlad commented on Oct 21, 2025

    @soloVlad

    +1

  19. soloVlad commented on Oct 21, 2025

    @soloVlad

    If you really need this feature, you can use "patch-package" library (or, if you are using pnpm, pnpm patch functionality) and the answer from @VerburgtJimmy.

    The local patch will be stored in your repo, which you will be able to simply remove if ionic will handle this by itself.

    Keep in mind that with this fix you need to manually handle label position if "start" slot is presented, because they start overlapping (you can make a patch that removes only "end" slot check e.g.)

  20. dennido commented on Dec 8, 2025

    @dennido

    +1

  21. kucki10 commented on Jan 26, 2026

    @kucki10

    +1 (ionic v8)

  22. ADM-Dev-mx commented on Jun 15, 2026

    @ADM-Dev-mx

    +1, This is still happening.

    Just looked into the code and it seems there is already a TODO for this issue. So it is just a question of when it is done:

    The TODO is still in the code. Are you working on this right now? If not, I would like to work on a PR to fix it :).

  23. Rattone commented on Jun 29, 2026

    @Rattone

    I think there is not much interest in solving this trivial problem, at least that's how it seems

  24. added a commit that references this issue on Aug 14, 2026
    a292789
  25. ionitron-bot commented on Sep 18, 2026

    @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.

  26. locked and limited conversation to collaborators on Sep 18, 2026
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

    Fields

    Stage

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions