iachat/app/javascript/dashboard
Sivin Varghese 728956a734
fix: Inbox delete confirmation fails due to whitespace (#12498)
# Pull Request Template

## Description

This PR fixes an issue where users are unable to delete an inbox because
the delete confirmation button remains disabled.

### Cause

Inboxes created with leading or trailing spaces in their names failed
the confirmation check. During deletion, the confirmation modal compared
the raw user input with the stored inbox name. Because whitespace was
not normalized, the values did not match exactly, causing the delete
button to remain inactive even when the correct name was entered.

### Solution

The validation logic now trims whitespace from both the input and stored
value before comparison. This ensures inbox names with accidental spaces
are handled correctly, and the delete button works as expected in all
cases.

Fixes
https://linear.app/chatwoot/issue/CW-5659/confirmation-button-greyed-out-randomly-when-deleting-inbox-from-inbox

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Steps to Reproduce**

1. Create an inbox with leading or trailing whitespace in its name.
2. Save and complete the inbox creation process.
3. Go to the inbox list and try deleting the inbox by entering the name
without the whitespace in the confirmation modal.
4. Now you can't able to delete the inbox.


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-09-23 22:20:43 +05:30
..
api feat: Add the frontend support for MFA (#12372) 2025-09-18 21:16:06 +05:30
assets chore: Improve layout styles (#12025) 2025-07-30 13:49:27 -07:00
components fix: Inbox delete confirmation fails due to whitespace (#12498) 2025-09-23 22:20:43 +05:30
components-next feat: Captain animating SVGs (#12448) 2025-09-22 10:10:26 +05:30
composables feat: Add support for labels in automations (#11658) 2025-09-18 14:17:54 +05:30
constants chore: Enable flexible whatsapp onboarding (Manual + Embedded Signup) options (#12344) 2025-09-15 19:59:56 +05:30
helper feat: Add media_name support for WhatsApp templates document files (#12462) 2025-09-18 15:25:31 +05:30
i18n feat: Allow creating contact notes (#12494) 2025-09-23 18:53:00 +05:30
mixins chore: Default file limits for private notes and reset attachment on mode switch (#12310) 2025-08-27 11:56:07 +05:30
modules feat(ee): Setup advanced, performant message search (#12193) 2025-08-28 10:10:28 +05:30
routes fix: Inbox delete confirmation fails due to whitespace (#12498) 2025-09-23 22:20:43 +05:30
store feat: Update meta debounce max wait (#12493) 2025-09-23 13:57:17 +05:30
App.vue feat: Agent language settings (#11222) 2025-09-09 14:27:36 +05:30
featureFlags.js feat: remove SAML from premium feature list (#12443) 2025-09-15 21:41:34 +05:30