frontend: fix alt+tab

This commit is contained in:
Qing 2022-10-15 23:03:01 +08:00
parent 3c87b050d9
commit 8939e086ef

View File

@ -462,6 +462,17 @@ export default function Editor() {
}
}, [windowSize, resetZoom])
useEffect(() => {
window.addEventListener('blur', () => {
setIsChangingBrushSizeByMouse(false)
})
return () => {
window.removeEventListener('blur', () => {
setIsChangingBrushSizeByMouse(false)
})
}
}, [])
const handleEscPressed = () => {
if (isInpainting) {
return