fix: create more toggle fixes in create issue modal (#3355)

* fix: create more issue bugfixes

* fix: removing all warning
This commit is contained in:
sriram veeraghanta
2024-01-11 21:01:05 +05:30
parent a679b42200
commit 7ff91fdb82
30 changed files with 119 additions and 98 deletions

View File

@@ -43,22 +43,23 @@ function absoluteRect(node: Element) {
}
function nodeDOMAtCoords(coords: { x: number; y: number }) {
return document.elementsFromPoint(coords.x, coords.y).find((elem: Element) => {
return (
elem.parentElement?.matches?.(".ProseMirror") ||
elem.matches(
[
"li",
"p:not(:first-child)",
"pre",
"blockquote",
"h1, h2, h3",
"[data-type=horizontalRule]",
".tableWrapper",
].join(", ")
)
return document
.elementsFromPoint(coords.x, coords.y)
.find(
(elem: Element) =>
elem.parentElement?.matches?.(".ProseMirror") ||
elem.matches(
[
"li",
"p:not(:first-child)",
"pre",
"blockquote",
"h1, h2, h3",
"[data-type=horizontalRule]",
".tableWrapper",
].join(", ")
)
);
});
}
function nodePosAtDOM(node: Element, view: EditorView) {