Skip to content

Commit

Permalink
Disable default form submission handling
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Jan 31, 2023
1 parent 596d916 commit 631d8ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions idr_gallery/static/idr_gallery/omero_search_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ class OmeroSearchForm {
this.$form.html(`<div class="clauses"></div>`);
this.$form.append($(FORM_FOOTER_HTML));

// disable default form submission behaviour
// NB: Only needed on Safari
this.$form.on("submit", (event) => {
event.preventDefault();
})

// If resultsId, create results element...
if (resultsId) {
this.$results = $(`#${resultsId}`);
Expand Down

0 comments on commit 631d8ae

Please sign in to comment.