ionic-team / ionic-team/ionic-framework

bug: ion-input-password-toggle causes UI misalignment with clear-input icon

未关闭
#30,023 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 14 小时
30 天内合并 PR
50

描述

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Currently, with clear-input it shifts the icon to the left, so the alignment looks weird:

![image](https://github.com/user-attachments/assets/f51680df-de03-4c74-9879-2c27912564c3)

### Expected Behavior

Ideally, we want something like this:

![image](https://github.com/user-attachments/assets/b0c4d4c2-ea3f-414d-8d54-40c1a5d2b2af)

Oddly enough when trying to apply CSS positioning, it makes the icon non-interactable, i.e. can't click on it anymore.

### Steps to Reproduce

```html




```

### Code Reproduction URL

N/A

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/home/braincomb/.nvm/versions/node/v22.11.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 8.3.3

Capacitor:

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

Utility:

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

System:

NodeJS : v22.11.0 (/home/braincomb/.nvm/versions/node/v22.11.0/bin/node)
npm : 10.9.0
OS : Linux 5.15

### Additional Information

_No response_

贡献指南

打开贡献指南

调研方向

从提供的 ion-input 复现开始,使用 clear-input、start slot 中的 ion-icon,以及 end slot 中的 ion-input-password-toggle。检查相关 input 和 password-toggle 组件的样式,然后验证在复现的情况下图标仍保持对齐,并且密码切换控件仍可点击。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。