Disable Android LastPass for contenteditable field

161 views Asked by At

I have a problem with a rich text editor built around a <div ... contenteditable="true">. I've tried disabling autofill in every way that I can -- data-lpignore="true", autocomplete="off", but no matter what I try, LastPass's autofill dialog pops up on Android when I focus into the textbox, making it extremely difficult to use. I can't even dismiss it without it popping up next time I refocus the editor.

How can I make LastPass, and most likely other mobile password managers that I don't use, ignore this div with the contenteditable attribute on it?

Android accessibility info for the element

1

There are 1 answers

0
Austin Burk On

It seems that setting the aria-label html attribute on the div fixed this in my case. That attribute alone seemed to solve my issue, even with autocomplete and data-lpignore removed.

I'm not entirely sure why it was broken in my case -- I was using the Quill editor. It may have something to do with how the editor is set up in the framework I'm using. However, this answer should be useful to anyone facing a similar issue.

It would be really great to find out the actual science behind this for a more satisfactory answer!