Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ww3 mq-editor preview button code causing console log error in ww2 gateway quizzes. #681

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

drgrice1
Copy link
Member

In a gateway quiz since the form by the name problemMainForm does not exist, the webwork 3 code that looks form the preview button of a specific problem to click when enter is pressed in a MathQuill answer box returns an empty list. This causes a console error message.

@pstaabp
Copy link
Member

pstaabp commented May 26, 2022

Is this supposed to occur if the preview button is clicked in a gateway quiz? I'm not seeing an error.

@drgrice1
Copy link
Member Author

No. It does not happen when you click on the preview button. It occurs if the focus is in a MathQuill answer box, and then you hit enter.

@drgrice1 drgrice1 force-pushed the ww3-preview-not-in-ww2 branch from 90b1931 to d5d55d1 Compare May 26, 2022 15:08
@drgrice1
Copy link
Member Author

After testing this with webwork3 itself I realized that this wasn't working there either. The Element.closest method does not return a list. It just returns the closest element satisfying the selector or null if that isn't found. Previously I believe I was using a querySelectorAll which does return a list, and when I changed it, I forgot to drop the index.

@pstaabp pstaabp merged commit c2c4d31 into openwebwork:PG-2.17 Jul 6, 2022
@drgrice1 drgrice1 deleted the ww3-preview-not-in-ww2 branch July 18, 2022 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants