summaryrefslogtreecommitdiff
path: root/script/generate
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-05 21:49:21 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-05 21:49:21 +0200
commit1fa2f3821497d5529a6753cee84cf5ca679e8bcc (patch)
tree7c6e98cfc9fc0b452e055c6201fb8aefa3c71965 /script/generate
parent9c630d186003a47563be2e3547485060dac7dd98 (diff)
Fix admin search results colliding with other search widgets
layouts/admin.html.erb's top-bar search results div shared id "search_results" with nodes#new/nodes#edit's parent-search widget - since the layout renders on every admin page, whichever widget's JS ran last silently won the shared ID, putting top-bar results into the parent-search box on affected pages. Renamed to "menu_search_results" and updated admin_search.js to match. Also modernizes admin_search.js's event bindings from keyup/keydown/ keypress/paste/cut + .attr("value") to input + .val() throughout (menu_items, parent_search, move_to_search) - the multi-event binding was working around old IE compatibility that .val() + "input" already handles correctly. parent_search's result rendering now matches menu_search's convention (real <p>/<a> markup with a .result_path span) instead of a bare <a> in a throwaway wrapper div, so the same CSS rule now correctly applies to both. menu_search's JSON response gains node_path per result, matching what admin_search's own results already provide - not yet consumed by parent_search/move_to_search, which still render click-to-select links rather than navigable ones (correct for their purpose - selecting a value, not leaving the page). Known remaining gap, not fixed here: menu_items, parent_search, and move_to_search still all target the literal id "search_results" between themselves. No live collision today since none of the three currently share a page, but it's the same fragility as the bug above - tracked alongside the existing menu_items/parent_search/move_to_search consolidation backlog item rather than treated as resolved.
Diffstat (limited to 'script/generate')
0 files changed, 0 insertions, 0 deletions