mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): fix active view with mouse (#6994)
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user