mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
fix(core): disable page header title from dragging when editing (#9258)
fix AF-2014
This commit is contained in:
@@ -189,6 +189,13 @@ export function DetailPageHeader(
|
|||||||
id: page.id,
|
id: page.id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
canDrag: args => {
|
||||||
|
// hack for preventing drag when editing the page title
|
||||||
|
const editingElement =
|
||||||
|
args.element.contains(document.activeElement) &&
|
||||||
|
document.activeElement?.tagName === 'INPUT';
|
||||||
|
return !editingElement;
|
||||||
|
},
|
||||||
onDragStart: () => {
|
onDragStart: () => {
|
||||||
track.$.header.$.dragStart();
|
track.$.header.$.dragStart();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user