diff --git a/app/javascript/benefit_sponsors/controllers/office_locations_controller.js b/app/javascript/benefit_sponsors/controllers/office_locations_controller.js index 3c514d9096a..77619e15b8a 100644 --- a/app/javascript/benefit_sponsors/controllers/office_locations_controller.js +++ b/app/javascript/benefit_sponsors/controllers/office_locations_controller.js @@ -89,7 +89,7 @@ export default class extends Controller { removeButton.classList.remove('hidden'); var removeButtonId = "remove-button-" + totalLocationsCount; removeButton.id = removeButtonId; - removeButton.setAttribute('onkeydown', `handleButtonKeyDown(event, '${removeButtonId}')`); + removeButton.setAttribute('data-keydown-id', `${removeButtonId}`); newLocation.querySelector('input[placeholder="00000"]').setAttribute('data-action', ""); // need to explicitly add event listeners for onInput and onInvalid for phone number fields: