Skip to content

bug: select label does not cover placeholder #27201

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

Closed
3 tasks done
EinfachHans opened this issue Apr 13, 2023 · 3 comments · Fixed by #27446
Closed
3 tasks done

bug: select label does not cover placeholder #27201

EinfachHans opened this issue Apr 13, 2023 · 3 comments · Fixed by #27446
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@EinfachHans
Copy link
Contributor

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When you have an floating md select with label and placeholder and no value selected the select appears buggy (see linked stackblitz)

Expected Behavior

I added to the stackblitz the current implementation of the same thing in the input coponent. That's how the select should work as well, so: Only show the label, if the select has focus: show the placeholder

Steps to Reproduce

Open attached stackblitz

Code Reproduction URL

https://github-1mgkjv-k38jrw.stackblitz.io

Ionic Info

Starter project

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 13, 2023
@liamdebeasi liamdebeasi changed the title bug(select): label & placeholder together are buggy bug: select label does not cover placeholder Apr 13, 2023
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Apr 13, 2023
@ionitron-bot ionitron-bot bot removed the triage label Apr 13, 2023
@munnokd
Copy link

munnokd commented Apr 19, 2023

@EinfachHans can you assign this issue to me?

@EinfachHans
Copy link
Contributor Author

EinfachHans commented Apr 20, 2023

@EinfachHans can you assign this issue to me?

I'm not working on the ionic framework but created a couple of merged pull requests myself. So if you are interested in fixing this bug you can create a PR of course 😊

Just follow the contribution guideline and the team will appreciate it

liamdebeasi added a commit that referenced this issue May 12, 2023
)

Issue number: resolves #27201

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Selects with a floating label, no value, and a placeholder should have
the label cover the placeholder when blurred. One focus, the label
should translate to the top of the select, and the placeholder should be
visible.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Floating label now covers the select and hides the placeholder when
the select is blurred, matching the `ion-input` and `ion-textarea`
behaviors.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
liamdebeasi added a commit that referenced this issue May 15, 2023
)

Issue number: resolves #27201

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Selects with a floating label, no value, and a placeholder should have
the label cover the placeholder when blurred. One focus, the label
should translate to the top of the select, and the placeholder should be
visible.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Floating label now covers the select and hides the placeholder when
the select is blurred, matching the `ion-input` and `ion-textarea`
behaviors.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
@ionitron-bot
Copy link

ionitron-bot bot commented Jun 11, 2023

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants