Skip to content

bug: ion-select placeholder overlaps label when select has focus and labelPlacement="floating" #30401

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

Open
3 tasks done
ReneZeidler opened this issue May 9, 2025 · 0 comments
Labels
type: bug a confirmed bug report

Comments

@ReneZeidler
Copy link

ReneZeidler commented May 9, 2025

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When an ion-select with labelPlacement="floating" is focused, the placeholder is shown but the label remains in non-floating position, causing an overlap:
Image

(in this screenshot has-focus is manually set on all selects at once for illustrative purposes, in normal use only one select can be focused at once)

Expected Behavior

One of these two options:

  • The placeholder is not shown
    Image

  • The placeholder is shown and the label floats
    Image

Steps to Reproduce

  1. Open the reproduction URL
  2. Click anywhere on the page, the use Tab to focus the ion-select elements

Code Reproduction URL

https://stackblitz.com/edit/pxhxnc4c-tltkbxwu

Ionic Info

Ionic:

Ionic CLI : 7.2.1
Ionic Framework : @ionic/angular 8.5.7
@angular-devkit/build-angular : 19.2.11
@angular-devkit/schematics : 19.2.11
@angular/cli : 19.2.11
@ionic/angular-toolkit : 12.2.0

Utility:

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

System:

NodeJS : v20.19.1 (/usr/local/bin/node)
npm : 10.8.2
OS : Linux 5.0

Additional Information

The rule setting the placeholder opacity to 1 when the select .has-focus overrides the rule hiding the placeholder when it is :not(.label-floating)
Image

Another related bug is that the opacity gets overriden with 1 instead of var(--placeholder-opacity), causing the placeholder to appear black instead of gray. See #30402.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants