Files
Colin Bares f1defba2ac fix(input): prevent layout shift when hiding password toggle (#30533)
Issue number: resolves #29562 

---------

<!-- 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?
When an input with a password toggle is given `disabled` or `readonly`,
hiding the password toggle causes a layout shift as it shrinks the
height of the input component.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Password toggle is given `visibility: hidden` instead of removing it
from the DOM with `display: none` so it retains it's space but is still
hidden and still removed from the accessibility tree.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

This solution was suggested by @piotr-cz in the bug report.
<!-- 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: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-07-09 20:53:48 +00:00
..