ionic-team / ionic-team/ionic-framework

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

Abierto
#30,128 0 comentarios 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.