Fix repositioniong of the feedback popover when typing in MathQuill inputs. (hotfix of #1110) #1116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When an answer has multiple responses and a MathQuill input for a response that is not the first one is typed in with a feedback popover open, the feedback popover does not correctly resposition. This is because currently only the first answer label is saved in the data attribute. So when the mqeditor sets up the later responses which have different answer labels, it doesn't see the feedback button. So now all answer labels for the response group are saved as a JSON encoded array. The mqeditor then searches the feedback buttons on the page to find the one with the correct answer label.
Here is a MWE for testing this:
If you type in a matrix entry other than the first column of the first row when a feedback popover is open, then the popover position is not updated with the develop branch, but is with this pull request.
Note that this also occurs with
MultiAnswer
objects withsingleResult => 1
set.Now, I was actually trying to fix @somiaj's comment in openwebwork/webwork2#2524 (comment). I believe that this might also fix that issue. I can't test that because I can't reproduce this issue (my computer is to fast?). However, I have good reason to believe that this will fix it.