Skip to content

Conversation

@iamibrahimriaz
Copy link
Collaborator

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

When changes directory type, the search form markup is replaced via AJAX. The original code bound events directly to elements that existed at initialization.

Before:

  • Events were bound directly: $(field.input_elm).on('keyup', ...)
  • When the DOM was replaced, the old elements (and their handlers) were removed
  • New elements had no handlers, so the AJAX didn't trigger

After (a directory type change):

  • The form markup is replaced
  • New location input fields are added
  • The delegated handler on body catches keyup events on the new inputs
  • The OpenStreetMap AJAX request triggers correctly

Any linked issues

Fixes Taiga 72316

Checklist

@Armanul46 Armanul46 added this to the v8.5.8 milestone Jan 18, 2026
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