fix(core): fix active view with mouse (#6994)

This commit is contained in:
EYHN
2024-05-20 08:19:53 +00:00
parent df73b6ddc7
commit 7fddd14f72

View File

@@ -64,11 +64,11 @@ const WorkbenchView = ({ view, index }: { view: View; index: number }) => {
useEffect(() => {
if (containerRef.current) {
const element = containerRef.current;
element.addEventListener('mousedown', handleOnFocus, {
element.addEventListener('pointerdown', handleOnFocus, {
capture: true,
});
return () => {
element.removeEventListener('mousedown', handleOnFocus, {
element.removeEventListener('pointerdown', handleOnFocus, {
capture: true,
});
};