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

focus on question

parent d5b459f5
No related branches found
No related tags found
1 merge request!396add inputs
...@@ -159,7 +159,7 @@ const EditorComponent = ({ node, view, getPos }) => { ...@@ -159,7 +159,7 @@ const EditorComponent = ({ node, view, getPos }) => {
}, },
questionId, questionId,
); );
if (questionView.hasFocus()) questionView.focus(); questionView.focus();
}, []); }, []);
const dispatchTransaction = tr => { const dispatchTransaction = tr => {
......
...@@ -156,6 +156,7 @@ export default ({ node, view, getPos }) => { ...@@ -156,6 +156,7 @@ export default ({ node, view, getPos }) => {
setAddingOption(false); setAddingOption(false);
}); });
setOptionText(''); setOptionText('');
addOptionRef.current.focus();
}; };
const updateOptionText = () => { const updateOptionText = () => {
......
...@@ -88,8 +88,6 @@ export default ({ node, view, getPos }) => { ...@@ -88,8 +88,6 @@ export default ({ node, view, getPos }) => {
}); });
}; };
const options = [];
return ( return (
<Option> <Option>
{!readOnly && ( {!readOnly && (
......
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