mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[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:
@@ -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"
|
||||
/>
|
||||
`;
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user