Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete search field with emails #8236

Open
2 tasks done
HassanHeydariNasab opened this issue Jan 8, 2025 · 4 comments · May be fixed by #8248
Open
2 tasks done

Autocomplete search field with emails #8236

HassanHeydariNasab opened this issue Jan 8, 2025 · 4 comments · May be fixed by #8248
Assignees
Labels
bug broken functionality, usability problems, unexpected errors

Comments

@HassanHeydariNasab
Copy link
Contributor

  • This is not a feature request (existing functionality does not work, not missing functionality).
    I will request features on forum or via support.
  • I've searched and did not find a similar issue.

Bug in web app

Describe the bug
When the user clicks on the "New email" button, a dialog appears: "Enabling the search for your mailbox consumes memory on your device and might consume additional traffic."

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Emails" tab
  2. Click on "New email"
  3. See the dialog: "Enabling the search for your mailbox consumes memory on your device and might consume additional traffic." or it probably searches in emails if the search is enabled.

Expected behavior

It should not try to search in emails if the "New email" button is clicked.

Screenshots

Screenshot_20250108_193826
Screenshot_20250108_194130

Desktop (please complete the following information):

  • OS: Manjaro
  • Browser: Chrome
  • Version: 131

Additional context
It probably occurs because of placeholder="Search emails" in the search input and the New email button has a default value for type which is submit. Chrome assumes that it should auto complete with "emails". We should set the autocomplete attribute to a proper value to not confuse the web browser.

@HassanHeydariNasab HassanHeydariNasab added the bug broken functionality, usability problems, unexpected errors label Jan 8, 2025
@hrb-hub
Copy link
Contributor

hrb-hub commented Jan 8, 2025

@HassanHeydariNasab Thank you for the report,
This is an odd one! clicking the New email button should open the mail editor, and the dialog you're seeing should only show when clicking the search input if the mail index hasn't been enabled. The two should not be related.

I tried reproducing the issue locally without success. could you please provide us with more details to help us debug this?

@HassanHeydariNasab
Copy link
Contributor Author

I tried with a fresh Chrome profile and Chrome automatically fills the search input with the saved credential (my email address) and when I click the "New email" button, it opens the mail editor and the search dialog at the same time.
Screenshot_20250108_204234

@hrb-hub
Copy link
Contributor

hrb-hub commented Jan 9, 2025

@HassanHeydariNasab Thanks for the clarification, I did manage to reproduce it reliably on chromium. I specifically did the following:

  • In chrome://password-manager/settings I enabled: Offer to save passwords, and Sign in automatically
  • Cleared all browser data
  • Logged in
  • When prompted to save the password by chromium's password manager, clicked "Save"
  • Clicked the "New email" button

@hrb-hub
Copy link
Contributor

hrb-hub commented Jan 9, 2025

After a bit of investigation, it appears that as long as the search input's placeholder contains the word "emails", chrome will autofill the input, even with autocomplete="off" and with the "New email" button having a type="button".

Screenshot from 2025-01-09 15-02-05

Update: Even with a placeholder="Search mailbox" chrome still autofills the field

@hrb-hub hrb-hub self-assigned this Jan 10, 2025
hrb-hub added a commit that referenced this issue Jan 10, 2025
On chrome, clicking the "New email" button causes the search input to
be autofilled with the user's email. This happens even with
autocomplete set to "off", and with the button having a type of "button"

Wrapping the search input in a form isolates it from unrelated buttons
and fixes the issue.

Close #8236
@hrb-hub hrb-hub linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants