[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>
Этот коммит содержится в:
goooov
2024-02-27 03:18:05 +05:30
коммит произвёл GitHub
родитель 0d2053aa5c
Коммит d788ece25d
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@@ -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'