UX: only toggle rich editor details on caret click (#32267)

This commit is contained in:
Renato Atilio
2025-04-12 09:01:20 -03:00
committed by GitHub
parent bc070dcbe3
commit fdb805d131

View File

@ -69,7 +69,10 @@ const extension = {
plugins: {
props: {
handleClickOn(view, pos, node, nodePos) {
if (node.type.name === "summary") {
if (pos > 2 || node.type.name !== "summary") {
return false;
}
const details = view.state.doc.nodeAt(nodePos - 1);
view.dispatch(
view.state.tr.setNodeMarkup(nodePos - 1, null, {
@ -77,7 +80,6 @@ const extension = {
})
);
return true;
}
},
},
},