mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
fix(core): fix menu not close when click outside (#9535)
This commit is contained in:
@@ -206,6 +206,11 @@ export class AffinePageDraggingAreaWidget extends WidgetComponent<
|
||||
const container = this.block.rootElementContainer;
|
||||
if (!container) return;
|
||||
|
||||
const currentFocus = document.activeElement;
|
||||
if (!container.contains(currentFocus)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const containerRect = container.getBoundingClientRect();
|
||||
const containerStyles = window.getComputedStyle(container);
|
||||
const paddingLeft = parseFloat(containerStyles.paddingLeft);
|
||||
|
||||
Reference in New Issue
Block a user