Skip to content

Commit

Permalink
fix: edit and launch button fail on keeping mouse over while reload (#…
Browse files Browse the repository at this point in the history
…36954)

## Description

> Fixes edit and launch buttons fail to appear if mouse pointer is
hovering over the Application box while loading webpage
> Tested it thoroughly.


https://github.com/user-attachments/assets/797df6c8-04b7-48af-ae87-51a89ad25e62




Fixes #36804  

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Updated mouse event handling in the Card component for improved
overlay display behavior.

- **Refactor**
- Adjusted event triggering from `onMouseEnter` to `onMouseOver` without
altering overall functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
ALOK9442 authored Oct 17, 2024
1 parent b122c81 commit e5e6989
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/client/src/components/common/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ function Card({
className={testId}
hasReadPermission={hasReadPermission}
isContextMenuOpen={isContextMenuOpen}
onMouseEnter={() => {
!isFetching && setShowOverlay(true);
}}
onMouseLeave={() => {
// If the menu is not open, then setOverlay false
// Set overlay false on outside click.
!isContextMenuOpen && setShowOverlay(false);
}}
onMouseOver={() => {
!isFetching && setShowOverlay(true);
}}
showOverlay={showOverlay}
testId={testId}
>
Expand Down

0 comments on commit e5e6989

Please sign in to comment.