drlippman/IMathAS

Exponent Positioning Bug in Input Field

wldeh opened this issue · 2 comments

wldeh commented

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):

  • OS: Windows
  • Browser: Edge
  • Version: 115.0.1901.188

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?

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.