[MM-56661] Fix: When deleting a draft you have to move your cursor away from the card and back to activate the buttons (#26170)

* [MM-56661] fix: hover logic changed to onMouseOver

* fix: updated snapshots

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
goooov
2024-02-27 03:18:05 +05:30
committed by GitHub
parent 0d2053aa5c
commit d788ece25d
2 changed files with 3 additions and 3 deletions

View File

@@ -4,8 +4,8 @@ exports[`components/drafts/panel/ should match snapshot 1`] = `
<article
className="Panel"
onClick={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
onMouseOver={[Function]}
role="button"
/>
`;

View File

@@ -16,7 +16,7 @@ const isEligibleForClick = makeIsEligibleForClick('.hljs, code');
function Panel({children, onClick}: Props) {
const [hover, setHover] = useState(false);
const handleMouseEnter = () => {
const handleMouseOver = () => {
setHover(true);
};
@@ -33,7 +33,7 @@ function Panel({children, onClick}: Props) {
return (
<article
className='Panel'
onMouseEnter={handleMouseEnter}
onMouseOver={handleMouseOver}
onClick={handleOnClick}
onMouseLeave={handleMouseLeave}
role='button'