Skip to content
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

Pass editorMode into text entry's Inequality reference on the equality demo page #1249

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

sjd210
Copy link
Contributor

@sjd210 sjd210 commented Dec 12, 2024

The bug is that text entry sometimes doesn't work on switching modes on the demo page. To recreate:

  1. Go to isaacphysics.org/equality (logged into an admin account)
  2. Choose ‘Nuclear Physics’ from the dropdown
  3. Type “H”
  4. Click to enter Inequality modal
  5. Submit
  6. Try to edit the text input prescripts (e.g. "{}^{2}_{}H")

This is broken (only for the demo page) due to the editorMode for inequality text entry (hiddenEditorRef) only being set when the main inequality editorMode changes, but the page reload forcing text entry to be generated again. This regenerated hiddenEditorRef therefore doesn’t have editorMode set, so it is set to the default of “logic”.

The solution is simply to pass the main editorMode into hiddenEditorRef’s editorMode when it is generated.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.61%. Comparing base (346c713) to head (2203a7c).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1249    +/-   ##
========================================
  Coverage   36.61%   36.61%            
========================================
  Files         451      451            
  Lines       19779    19779            
  Branches     6518     5847   -671     
========================================
  Hits         7243     7243            
- Misses      11881    12498   +617     
+ Partials      655       38   -617     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjd210
Copy link
Contributor Author

sjd210 commented Dec 12, 2024

We could also attach the needed Inequality update to this branch once the relevant Inequality PR is merged.

@jsharkey13 jsharkey13 merged commit a4a5244 into master Dec 20, 2024
4 checks passed
@jsharkey13 jsharkey13 deleted the bug/equality-demo-text branch December 20, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants