Automattic / Automattic/happychat-client
Confusing message during page unload
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
When browsing away from HC, or refreshing the page, the user sees a popup confirming they want to leave the site. This is the generic message from each browser.
**Chrome**

**Firefox**

**Safari**

This is being triggered in the HappychatForm component, and has an actual message to display:
https://github.com/Automattic/happychat-client/blob/2b1f59e5b5ab7bc3f081941f8eecfbd3bb68d25d/src/ui/components/happychat-form/index.js#L47-L50
However, that message is no longer displaying.
If you refresh [the support page on WooCommerce.com](https://woocommerce.com/my-account/create-a-ticket/), or leave and come back with chat still active on HUD, the chat is still there, so this alert may not be needed any more. If we keep it, it should be updated to display something less confusing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/ui/components/happychat-form/index.js at lines 47-50 and inspect how the page-unload handler is triggered. Reproduce the alert while refreshing or leaving the WooCommerce support page, then determine whether the alert is still needed given that active chat persists. Done means the resulting behavior no longer shows a confusing prompt, or the prompt displays an appropriate message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100