ionic-team / ionic-team/ionic-framework

bug: ion-input doesn't pass data attributes down to the actual input

Đang mở
#30,128 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### 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

The data attribute is emitted onto the `ion-input` not the `input`.

The reason I'm trying to do this is to [stop lastpass from getting in the way](https://support.lastpass.com/s/document-item?language=en_US&bundleId=lastpass&topicId=LastPass/c_lp_prevent_fields_from_being_filled_automatically.html&_LANG=enus):

> add the 'data-lpignore'=true attribute for those items which you do not want LastPass to automatically fill.

I've tried throwing all of the tricks that people have suggested at it:

```html



```

But it still auto suggests.

When I inspect the markup though, I can see that most have been passed down, but not the data attribute:

```html










```

### Expected Behavior

Pass the `data-*` attributes down to the `input`

### Steps to Reproduce

Use this snippet or the example stackblitz above and see that it doesn't have the data attribute:

```html

```

### Code Reproduction URL

https://stackblitz.com/edit/e4zyrjjj-d3expxf3?file=src%2Fapp%2Fexample.component.html

### Ionic Info

```
Ionic:

Ionic CLI : 7.2.0 (/Users/matthewharris/.nvm/versions/node/v20.12.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.1
@angular-devkit/build-angular : 19.0.7
@angular-devkit/schematics : 19.0.7
@angular/cli : 19.0.7
@ionic/angular-toolkit : 12.1.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : not installed
@capacitor/core : 6.2.0
@capacitor/ios : not installed

Utility:

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

System:

NodeJS : v20.12.1 (/Users/matthewharris/.nvm/versions/node/v20.12.1/bin/node)
npm : 10.9.1
OS : macOS Unknown

```

### Additional Information

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.