Fixed Username input in options page needs to have an option to add type="search"

AndyB

Well-known member
Affected version
2.2.12
Add-ons which contain a Username input in the options page should have a way to add the type="search" so browsers don't try to auto fill as seen in this image.

pic001.jpg
 
Last edited:
The type=search works fine when the Edit format is a Text box.

1695951200672.webp

Unfortunately if the Edit format is Username input, the issue as described in post #1 occurs.

1695951343440.webp
 
This is the missing image in post #1. It shows what occurs when we go to the options page where the Username input is being used. The Email to usernames field is empty, but the browser fills in the field assuming it's a log in.

1695951527710.png
 
Setting the input to search (or anything really) and hoping the browser will infer that you don't want to auto-complete it isn't the right way to do it. Assuming you are using <xf:tokeninput> or <xf:tokeninputrow>, what you are looking for is the autocomplete="off" attribute on either of those tags. That will end up in the generated input tag and is the way to explicitly tell the browser to not auto-complete or auto-select anything in that input field.


autocomplete="off"
The browser is not permitted to automatically enter or select a value for this field.
 
Yeah, it looks like we set autocomplete="off" for single-username inputs, but not multi-username inputs. Will move this back to open bugs for now.
 
Hi Jeremy,

I see this issue has been resolved in XF 2.3.0 Beta 2. Thank you.

Please move thread to Resolved bug reports.
 
Back
Top Bottom