[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>
Этот коммит содержится в:
@@ -4,8 +4,8 @@ exports[`components/drafts/panel/ should match snapshot 1`] = `
|
|||||||
<article
|
<article
|
||||||
className="Panel"
|
className="Panel"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onMouseEnter={[Function]}
|
|
||||||
onMouseLeave={[Function]}
|
onMouseLeave={[Function]}
|
||||||
|
onMouseOver={[Function]}
|
||||||
role="button"
|
role="button"
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const isEligibleForClick = makeIsEligibleForClick('.hljs, code');
|
|||||||
function Panel({children, onClick}: Props) {
|
function Panel({children, onClick}: Props) {
|
||||||
const [hover, setHover] = useState(false);
|
const [hover, setHover] = useState(false);
|
||||||
|
|
||||||
const handleMouseEnter = () => {
|
const handleMouseOver = () => {
|
||||||
setHover(true);
|
setHover(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ function Panel({children, onClick}: Props) {
|
|||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
className='Panel'
|
className='Panel'
|
||||||
onMouseEnter={handleMouseEnter}
|
onMouseOver={handleMouseOver}
|
||||||
onClick={handleOnClick}
|
onClick={handleOnClick}
|
||||||
onMouseLeave={handleMouseLeave}
|
onMouseLeave={handleMouseLeave}
|
||||||
role='button'
|
role='button'
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user