delph-in / matrix

The Grammar Matrix
https://matrix.ling.washington.edu/index.html
Other
12 stars 6 forks source link

Elements toggled on/off don't persist after page reload/switching between pages #729

Open taraw28 opened 5 months ago

taraw28 commented 5 months ago

If you use the toggle_element function to toggle an element on/off based on a checkbox or radio button, if you refresh the page or switch between pages, the toggling element gets reset to hidden. If it's a checkbox being used, then the checkbox toggling functionality gets inverted. The sentential negation and adnominal possession subpages have extra functions that run on load to correctly display the toggleable elements. This seems like something that should happen for every page by default though. This seems to be the same issue that's causing #725.

I've attached a video that showcases the issue:

video.webm

taraw28 commented 5 months ago

It looks like a function was created to handle this in web/matrix.js called display_form_choice, but it's only implemented for radio buttons (set_form_feature function) and neither of these functions are actually used anywhere.