Skip to content

[WIP] Fix admin dashboard user search input autofill#13

Merged
Vishnumgit merged 1 commit into
mainfrom
copilot/fix-admin-dashboard-user-search-autofill
Mar 21, 2026
Merged

[WIP] Fix admin dashboard user search input autofill#13
Vishnumgit merged 1 commit into
mainfrom
copilot/fix-admin-dashboard-user-search-autofill

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Fix admin dashboard user search input autofill.

Repo: Vishnumgit/feedback
File: admin-dashboard.html

Problem:
In the Admin Dashboard Users tab, the search input (id="userSearchInput") is being autofilled by the browser and shows a default value like "admin@college.edu" (see screenshot).

Goal:
Ensure the search box is empty by default and browser autofill does not inject saved emails.

Requirements:

  • Update the search input markup to reduce/disable autofill:
    • Change input type to "search" (optional but preferred)
    • Add attributes: autocomplete="off" (and/or autocomplete="new-password"), autocapitalize="off", autocorrect="off", spellcheck="false".
  • Ensure no code is explicitly setting the value to admin@college.edu.
  • Keep existing functionality: oninput triggers renderUserTable(role), and value binding uses current searchVal.

Context:
The relevant input is created in renderUserTable() as part of filterBar string:
<input id="userSearchInput" type="text" placeholder="..." oninput="renderUserTable('${role}')" value="${searchVal}" ... />

Please implement the change and open a pull request.

Image reference:
image1

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: defautly in search bar it is diplaying admin@college.edu remove it

Assistant: I’ve submitted the change, and we’re now waiting for you to accept/confirm it in the dialog so I can continue.

User: @copilot Accepted Confirmation: Are you sure?

Assistant: To remove that default admin@college.edu text in the Admin Dashboard search bar, you need to stop pre-filling the input’s value.

In your admin-dashboard.html, the search input is rendered like this (from the snippet you shared around the Users table filter bar):

<input id="userSearchInput" type="text"
  placeholder="&#128269; Search name, email, roll no..."
  oninput="renderUserTable('${role}')"
  value="${searchVal}" />

Fix

Make sure searchVal is empty by default (so the input starts blank). The simplest safe change is:

  • keep the placeholder as-is
  • set the input’s value to an empty string unless the user has actually typed something

For example, change value="${searchVal}" to:

value=""

(or, if you still want it to preserve typed searches during filtering, ensure searchVal starts as '' and is not being set to admin@college.edu anywhere.)

Important note

Right now I can’t apply further edits from here (no access to make another change in the repo in this message). If you paste the exact section where searchVal is being set (or tell me where admin@college.edu is coming from), I’ll tell you the exact line(s) to change so it stays blank without breaking the “keep what I typed while filtering” behavior.

User: admin@college.edu is taking for autofill passwords not from code

Assistant: That’s your browser autofill, not your code.

To stop admin@college.edu from appearing in that Users tab search input (#userSearchInput) you should tell the browser not to use autocomplete/autofill on that field (and ideally on the whole page/form area).

Fix in admin-dashboard.html

Update the search input like this:

<input id="userSearchInput"
  type="search"
  placeholder="&#128269; Search name, email, roll no..."
  oninput="renderUserTable('student')"
  value=""
  autocomplete="off"
  autocapitalize="off"
  autocorrect="off"
  spellcheck="false"
/>

If your browser still ignores it (Chrome sometimes does), use the stronger workaround:

autocomplete="new-password"

Also recommended (best chance)

Wrap the filter bar in a form and disable autocomplete at form level:

<form autocomplete="off">
  <!-- filter bar here -->
</form>

If you want me to commit this change

Tell me which branch you want to update (e.g. main) and confirm the repo is Vishnumgit/feedback. Then I’ll patch admin-dashboard.html properly (without changing any other UI code).

User: yes update

Assistant: I can’t apply the repo change from my side right now (write access isn’t available in this moment), but you can fix it with a single edit in admin-dashboard.html.

What to change

Find this line inside the Users tab filter bar template (it’s the input with id="userSearchInput"):

<input id="userSearchInput" type="text" placeholder="&#128269; Search name, email, roll no..." oninput="renderUserTable('${role}')" value="${searchVal}" style="padding:6px 12px;border-radius:8px;border:1px solid var(--border-light);background:var(--surface);color:var(--text);font-size:12px;width:220px;" />

Replace it with:

<input id="userSearchInput" type="search" placeholder="&#128269; Search name, email, roll no..." oninput="renderUserTable('${role}')" value="${searchVal}" autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false" style="padding:6px 12px;border-radius:8px;border:1px solid var(--...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

📍 Connect Copilot coding agent with [Jira](https://gh.io/cca-jira-docs), [Azure Boards](https://gh.io/cca-azure-boards-docs) or [Linear](https://gh.io/cca-linear-docs) to delegate work to Copilot in one click without leaving your project management tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants