-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Missplaced popup when showing correct answers in problem editor #2524
Comments
Note closing and opening the popup puts it back into the right spot. |
I noticed I don't have this issue in chromium, and have also noticed some other issues with mathjax that also go away using chromium (if you see in this screenshot you'll see there is no padding on the right of the formula before the matrix brace, but it works in chromium or if I use the chtml render). So I suspect the issue is with firefox-esr version 115, which will hit the end of its life in the next month or so. If no one else can reproduce these issues, or they go away when I upgrade firefox, I'll just close this as a firefox-esr 115 issue. |
I don't see this issue in Firefox 128.0.3 (not esr), nor in Google Chrome. You could experiment with the timeout in This is another one of those cases where the timeout is not the best solution. This may have nothing to do with Firefox or your version of it, but may be just a processing delay (perhaps your computer is a bit slower than mine!). If this is a persistent issue I will look into a better way of doing that. Perhaps working it into the MathJax promise. |
In fact, here is a better trial. Try changing line 17 of MathJax.startup.promise = MathJax.startup.promise.then(() =>
MathJax.typesetPromise(['.popover-body']).then(() => feedbackPopover.update())
); and delete line 73. See if that works better. |
@drgrice1 that did fix the positioning issues with the popup in my testing so far, so would fix the original issue of placement of the popup. |
@drgrice1 I ran across another similar issue, but this time with MathQuill, so the popup completes before MathQuill answer boxes are done resizing. Probably due to my 'slow' machine, here are some screenshots. The actual button feedback button is here Not a big deal, but if there is an easy fix it would be nice. |
Note, there is very little MathJax in this problem, so the MathJax in this case finishes rendering before MathQuill does. |
…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.
…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.
…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.
…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.
When clicking 'Show Correct Answers" while testing problems in the problem editor, the feedback popup with the answer defaults to open, but gets put in the wrong place due to the time it takes MathJax to resize the math content, so the feedback button moves after the popup. Here is the result:
The text was updated successfully, but these errors were encountered: