Restore long-lost form-handling ability to modal.js interactivity in modal dialog #3772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally modal.js could handle form submissions in a modal as well as links.
But this behavior wasn't actually used by Blacklight, or tested -- it was available for Blacklight apps to use though. It made sense to support since it was a variation on the hyperlink behavior, keep it DRY.
But it was removed in some prior commits refactoring, perhaps be61504, if not before -- it was quite possibly already broken at that point.
This PR adds it back in, in case it is desired by community!
i got to needing this for a local app, but if it is not desired to be part of BL, it's okay with me, I can easily patch it back in locally only in my app.
It does not at present have tests. it's kind of a pain to have tests, since there is no behavior in default BL that exersizes it, we'd have to figure out how to add exersizing behavior to test app somehow, which engine_cart makes difficult. If there is interest in this feature, and people believe tests are necessary, perhaps we can join heads on how to do it.
Closes #2331