From f7db329364b816966832f719543558a2c2c545eb Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Feb 2026 16:27:30 +0000 Subject: [PATCH] Don't assume the main form element is the only form on the page --- src/client/javascripts/location-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/javascripts/location-map.js b/src/client/javascripts/location-map.js index a454974f1..55239374c 100644 --- a/src/client/javascripts/location-map.js +++ b/src/client/javascripts/location-map.js @@ -112,7 +112,7 @@ export function initMaps(config = {}) { // If there are location components on the page fix up the main form submit // handler so it doesn't fire when using the integrated map search feature if (locations.length) { - const form = document.querySelector('form') + const form = locations[0].closest('form') if (form === null) { return