* Fix combobox suggestion list flashing on click
* Coerce combobox fill response to an array and register listeners once
The fill request error path resolved to {}, so a failed request (e.g. 403/500) or a non-array response body made updateSuggestions throw on items.filter(). Coerce the response to an array instead.
Also keep the latest suggestions on the element and attach the focus, focusout and input listeners only once. Previously every refillOnChange (the initial fill plus each fillDependsOn change) re-added them, stacking duplicate handlers that fired repeatedly over stale data.
* Add abort support to FormChecker delayed checks
Support optional AbortController/AbortSignal in FormChecker.delayedCheck, skip aborted queued checks, and handle aborted/failed requests without stalling queue processing. Add regression test covering cancellation of outdated checks.
* Update test/src/test/java/hudson/util/FormFieldValidatorTest.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address review feedback on FormChecker abort handling
Guard non-GET URL parsing when no query string is present, prevent schedule queue stalls on synchronous sendRequest failures, and make the regression test wait for queue drain instead of fixed timing.
* Use JS based test instead of hacky htmlunit test
---------
Co-authored-by: Kevin <kevin@Kevins-MacBook-Pro-3.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
* Update dependency prettier to v3.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Use '</pre>' tag instead of inserting a line break in the tag
---------
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
When an item is deleted from a one-each hetero-list, the Add button
stays disabled until manually clicked. This regression was introduced
in #10186.
Root cause: toggleButtonState counts elements with class
repeated-chunk, but deleted elements get the fade-out class and are
only removed from the DOM after the CSS transition ends. The
MutationObserver fires on childList changes (actual removal), which
happens too late — by the time the animation ends the user has already
seen a disabled button they cannot use.
Fix:
- Exclude elements with the fade-out class from the selected count in
toggleButtonState, since they are visually and logically deleted.
- Observe attribute changes (class) in addition to childList, so
toggleButtonState runs immediately when fade-out is applied rather
than waiting for the element to be physically removed.
Fixes#26737
Signed-off-by: Aaron Mark <64331623+amarkdotdev@users.noreply.github.com>
The keydown event listener in generateDropDown() used an arrow function
with no parameters (() =>) but referenced 'event' inside the handler
body. This implicitly relied on the deprecated window.event global,
which is non-standard behavior and will fail in strict mode or in
browsers that do not populate window.event for programmatically
dispatched events.
This change adds 'event' as a proper parameter to the arrow function
so the event object is received directly from the DOM event system.
Co-authored-by: Rauneet Singh <rauneetsingh@Rauneets-MacBook-Air.local>
* allow to disable widget auto refresh
This feature is only enabled in development mode.
Currentyl limited to the build history widget.
Adds there 2 buttons in the overflow button that allow to disable the
auto refresh. Once disabled you can trigger the refresh manually.
Switching to the next page keeps the refresh disabled, but reloading
the page will reset it.
* add separator
* Apply suggestions from code review
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
---------
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
* Add system property to allow disabling sticky elements
* use a cookie to drive disabling the elements
---------
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
Search responses could arrive out of order, allowing a stale response
to overwrite the table after the user had typed a newer query. Track a
request id and discard responses whose id no longer matches the latest
request.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>