mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
This commit is contained in:
parent
d08d6b6932
commit
84b42d447a
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ import {getIdFromSYProtocol, isLocalPath} from "../util/pathName";
|
|||
import {App} from "../index";
|
||||
import {Constants} from "../constants";
|
||||
import {getCellText} from "../protyle/render/av/cell";
|
||||
import {isTouchDevice} from "../util/functions";
|
||||
|
||||
let popoverTargetElement: HTMLElement;
|
||||
export const initBlockPopover = (app: App) => {
|
||||
|
|
@ -138,7 +139,7 @@ export const initBlockPopover = (app: App) => {
|
|||
|
||||
const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
|
||||
// pad 端点击后 event.target 不会更新。
|
||||
const target = document.elementFromPoint(event.clientX, event.clientY);
|
||||
const target = isTouchDevice() ? document.elementFromPoint(event.clientX, event.clientY) : event.target as HTMLElement
|
||||
if (!target) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue