Skip to content

pressing enter on advanced search should trigger search - #99

Merged
joecorall merged 4 commits into
Islandora:2.xfrom
joshdentremont:joshdentremont-patch-1
Sep 9, 2026
Merged

joecorall merged 4 commits into
Islandora:2.xfrom
joshdentremont:joshdentremont-patch-1

Conversation

@joshdentremont

@joshdentremont joshdentremont commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

What does this Pull Request do?

Drupal 11 added the ability to use type="button" for forms instead of type="submit" so this changes the +, -, and reset buttons to be type="button" which makes the search button the one that is triggered when you press enter. Previously, pressing enter would trigger the + button.

This also removes the javascript piece that overrides the enter key, because it caused enter to trigger the first button instead of the first submit.

On Drupal 10, the buttons should still be rendered as type="submit". In testing this, it seems like without the javascript piece, pressing enter does nothing, instead of triggering the + button as it did before this change. I think this is fine, given where we are in the Drupal 10 lifecycle, but we could probably try to find a solution that works for 10 as well if there was a desire.

On Drupal 11, pressing enter should submit the form.

I also dropped support for Drupal 8 & 9 since they are both EOL

How should this be tested?

  • type in the search box in advanced search and press enter
    • on Drupal 10 before and after this patch
    • on Drupal 11 before and after this patch

Documentation Status

N/A

Additional Notes:

N/A

Interested parties

@Islandora/committers

@joecorall
joecorall self-requested a review August 19, 2026 17:10
Comment thread advanced_search.info.yml Outdated

@joecorall joecorall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the one nit I commented on

Co-authored-by: Joe Corall <joe@libops.io>
@joecorall
joecorall merged commit 4de2c1f into Islandora:2.x Sep 9, 2026
8 checks passed
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