Skip to content
Snippets Groups Projects
Commit f4f4458a authored by chris's avatar chris
Browse files

fix

parent 80a83a9c
No related branches found
No related tags found
1 merge request!359new node structure
......@@ -20,7 +20,7 @@ const Button = ({ view = {}, item }) => {
const handleMouseDown = (e, editorState, editorDispatch) => {
e.preventDefault();
run(editorState, dispatch);
run(editorState, editorDispatch);
};
const isActive = !!(
......
......@@ -113,14 +113,16 @@ const QuestionEditorComponent = ({ node, view, getPos }) => {
disallowedTools: ['MultipleChoice'],
handleDOMEvents: {
mousedown: () => {
context.view.main.dispatch(
context.view.main.state.tr.setSelection(
new TextSelection(
context.view.main.state.tr.doc.resolve(getPos() + 2),
context.updateView({}, questionId);
context.view[context.activeViewId].dispatch(
context.view[context.activeViewId].state.tr.setSelection(
TextSelection.between(
context.view[context.activeViewId].state.selection.$anchor,
context.view[context.activeViewId].state.selection.$head,
),
),
);
context.updateView({}, questionId);
// Kludge to prevent issues due to the fact that the whole
// footnote is node-selected (and thus DOM-selected) when
// the parent editor is focused.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment