RocketChat / RocketChat/Rocket.Chat

Save button appears when adding only whitespace to profile fields

Open
#38,243 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When editing profile fields in the Account Settings, adding only whitespace (spaces, tabs) to any text field triggers the "Save Changes" button to appear, even though no meaningful content has changed.

Steps to reproduce:
  1. Go to 'Account Settings' → 'Profile'
  2. Click on the Name field (or any text field like Username, Nickname, Bio, Status Message)
  3. Add a few spaces at the end or beginning of the existing value
  4. Observe the "Save Changes" button appears
Expected behavior:

The "Save Changes" button should only appear when there are actual content changes. Whitespace-only changes (leading/trailing spaces) should be ignored since they get trimmed on save anyway.

Actual behavior:

The "Save Changes" button appears immediately when adding spaces, creating a false impression that there are changes to save. Clicking save doesn't actually change anything since the values are trimmed server-side.

Client Setup Information
  • Desktop App or Browser Version: Any
  • Operating System: Any

https://github.com/user-attachments/assets/2f8fd8ed-a023-4513-ad49-467853321c04

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Account Settings → Profile form implementation and inspect the existing logic that determines when the "Save Changes" button appears. Reproduce the issue with leading and trailing whitespace, then verify that whitespace-only edits keep the button hidden while meaningful content changes still show it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.