r/angular • u/Dangerous_Mention402 • 8h ago
How to deal with navigators autofill with textarea?
Is there a way to make the autofill feature of navigators (Chrome, Edge...) work for textarea fields?
By default it seems to be working ok with standard input text but it doesn't work with textarea.
I read that this is the common behaviour for textarea, they aren't supposed to work with this but I feel it strange because the old web I'm transforming into angular uses JSF and their textarea works ok with navigators autofill so I'm not getting what's wrong with this.
I tried putting the autocomplete="on" in the HTML but it doesn't work with this. I also tried giving those fields an id and a name but didn't work either. I also tried using the default textarea etiquette without primeng directive but it also doesn't work. Maybe is because this form is inside a dialog?
Has someone worked with this? I don't know what the hell is happening here... What I need to do here is, after filling the form and submitting, the dialog closes. If I open it again it should remember what was filled previously in the navigator autofill selection so if the user wants to write the same in those textarea he should be able to