drlippman / IMathAS

IMathAS Online Math Assessment
Other
110 stars 98 forks source link

Exponent Positioning Bug in Input Field #404

Open wldeh opened 11 months ago

wldeh commented 11 months ago

Describe the bug: When entering an exponent in a WAMAP answer box, the exponent initially appears in a lower position. If it is deleted (backspaced) and re-entered, it then appears in a higher position.

To Reproduce: Steps to reproduce the behavior:

  1. Go to a WAMAP math answer box/input field that
  2. Type in an exponent (e.g., x^2)
  3. Observe the position of the exponent
  4. Backspace the exponent
  5. Re-enter the exponent
  6. Observe that the exponent is now displayed in a higher position

Expected behavior: The exponent should consistently be displayed in the same position, regardless of whether it has been backspaced and re-entered.

Screenshots: Screenshot 2023-08-10 071738

Desktop (please complete the following information):

drlippman commented 11 months ago

While I've seen that positioning error happen, it doesn't happen consistently for me. I just tested in both Chrome and Edge, and didn't experience this behavior on the questions I tried it with. Does this happen in every question for you? Is there a particular question ID where you see this happen consistently?

drlippman commented 11 months ago

I've been able to replicate the issue in certain cases. But for the life of me, I can't figure out what's causing it. Best I can tell, something in the mathquill exponent positioning code is getting tripped up by something in the page CSS, since the issue goes away if I change themes. But there is no obvious specific CSS causing it, nor anything in the positioning code that would explain why it would cause a problem. This unfortunately may be outside my ability to fix.