iachat/app/javascript/dashboard
Sivin Varghese 3fe771df6f
fix: Modal in the context menu disappears unless hovered (#10333)
# Pull Request Template

## Description

This PR resolves the issue where the modal in the context menu
disappears when not being hovered over.

**Cause of issue.**
The problem occurred because the modal-related component was placed
inside `MessageContextMenu.vue`, and the parent wrapper was using the
classes `group-hover:visible invisible`. This caused the modal to only
appear when the message item, where the context menu was opened, was
hovered over.

**Solution**
To fix this, I removed the `group-hover:visible` invisible class from
the parent wrapper and moved it into the `woot-button` within the
`MessageContextMenu.vue` component. Additionally, I added a nested group
with the class group/context-menu, allowing the focus to remain on the
context menu itself.

Fixes
https://linear.app/chatwoot/issue/PR-1415/modal-in-the-context-menu-disappears-unless-hovered

## Type of change

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

## How Has This Been Tested?

**Loom video**

**Before**

https://www.loom.com/share/458f90708664493c86e909a56869d065?sid=0564a508-09a5-4e73-800b-8042140a22ba

**After**

https://www.loom.com/share/c119936d181d406d89468f9482ef6b81?sid=5cf3b1b4-6c66-4f8c-8f93-a62465a93b57

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] 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
2024-10-22 13:26:56 +05:30
..
api chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
assets fix: solid colors (#10321) 2024-10-18 15:59:21 +05:30
components fix: Modal in the context menu disappears unless hovered (#10333) 2024-10-22 13:26:56 +05:30
components-next feat: Add article empty state component (#10278) 2024-10-17 19:56:38 -07:00
composables fix: Resolve accountId from the route, initialize route-sync before the app is loaded (#10245) 2024-10-08 09:25:51 -07:00
constants feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
helper chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
i18n feat: Add new Locale page (#10275) 2024-10-15 19:21:15 -07:00
mixins chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
modules fix: Modal in the context menu disappears unless hovered (#10333) 2024-10-22 13:26:56 +05:30
routes fix: Cannot read properties of undefined (reading '$touch') (#10264) 2024-10-10 21:29:43 -07:00
store fix: Fix Sentry issues from Vite migration (#10262) 2024-10-14 10:44:59 -07:00
App.vue fix: Resolve accountId from the route, initialize route-sync before the app is loaded (#10245) 2024-10-08 09:25:51 -07:00
featureFlags.js chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00