Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix repositioniong of the feedback popover when typing in MathQuill i…
…nputs. 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: ```perl DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl'); Context('Matrix'); $A = Matrix([ [ 0, -1 ], [ 1, 0 ] ]); BEGIN_PGML Enter [`[$A]`]: [_]*{$A}{10} END_PGML ENDDOCUMENT(); ``` 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 with `singleResult => 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.
- Loading branch information