Skip to content

Fix chat send button not re-enabling#2985

Merged
rajsite merged 3 commits into
mainfrom
users/cmicu/fix-disabledInput
Jun 19, 2026
Merged

Fix chat send button not re-enabling#2985
rajsite merged 3 commits into
mainfrom
users/cmicu/fix-disabledInput

Conversation

@Alexia-Claudia-Micu

Copy link
Copy Markdown
Contributor

Pull Request

🤨 Rationale

The send button is disabled when either sendDisabled is true (consumer side) or the text box is empty. The bug was that shouldDisableSendButton combined both conditions and its result was held in isInputEmpty (which only refreshed on text events).

Since sendDisabled is an attribute, its state change never caused IsInputEmpty to refresh.

👩‍💻 Implementation

IsInputEmpty now only tracks this.textArea!.value.length === 0 leaving the button state to be calculated in the template: ?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}

🧪 Testing

Added unit test.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@Alexia-Claudia-Micu

Copy link
Copy Markdown
Contributor Author

@rajsite Could you review this PR when you have the time as well? It is a fix for: #2981

@rajsite rajsite merged commit 2e05c1e into main Jun 19, 2026
10 of 11 checks passed
@rajsite rajsite deleted the users/cmicu/fix-disabledInput branch June 19, 2026 17:14
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