mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +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,
|
||||
},
|
||||
},
|
||||
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: () => {
|
||||
track.$.header.$.dragStart();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user