@@ -117,14 +117,14 @@ export default class Heading extends Node {
|
|||||||
|
|
||||||
handleFoldContent = (event: MouseEvent) => {
|
handleFoldContent = (event: MouseEvent) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (!(event.target instanceof HTMLButtonElement)) {
|
if (!(event.currentTarget instanceof HTMLButtonElement)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { view } = this.editor;
|
const { view } = this.editor;
|
||||||
const hadFocus = view.hasFocus();
|
const hadFocus = view.hasFocus();
|
||||||
const { tr } = view.state;
|
const { tr } = view.state;
|
||||||
const { top, left } = event.target.getBoundingClientRect();
|
const { top, left } = event.currentTarget.getBoundingClientRect();
|
||||||
const result = view.posAtCoords({ top, left });
|
const result = view.posAtCoords({ top, left });
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user