mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
e7fd94046d
commit
c6d69fd6f8
2 changed files with 2 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import {writeText} from "../../protyle/util/compatibility";
|
|||
import {showMessage} from "../../dialog/message";
|
||||
|
||||
export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
|
||||
document.getElementById("dragGhost")?.remove();
|
||||
if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) {
|
||||
if (getSelection().rangeCount > 0 && window.siyuan.menus.menu.element.contains(getSelection().getRangeAt(0).startContainer) &&
|
||||
window.siyuan.menus.menu.element.contains(document.activeElement)) {
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ export class Outline extends Model {
|
|||
item.style.opacity = "0.38";
|
||||
const ghostElement = item.cloneNode(true) as HTMLElement;
|
||||
document.body.append(ghostElement);
|
||||
ghostElement.dataset.id = "dragGhost"
|
||||
ghostElement.firstElementChild.setAttribute("style", "padding-left:4px");
|
||||
ghostElement.setAttribute("style", `border-radius: var(--b3-border-radius);background-color: var(--b3-list-hover);position: fixed; top: ${event.clientY}px; left: ${event.clientX}px; z-index:999997;`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue