Skip to content

Fire a change event on ispin spinners and guard against double init - #3436

Open
Salvialf wants to merge 2 commits into
developfrom
feat/ispin-change-event
Open

Fire a change event on ispin spinners and guard against double init#3436
Salvialf wants to merge 2 commits into
developfrom
feat/ispin-change-event

Conversation

@Salvialf

Copy link
Copy Markdown
Contributor
  • ISpin's own spin() method (triggered by the +/- buttons, arrow keys, and mouse wheel) updates the input's value via JS without ever firing a native change event, so listeners relying on change (e.g. an unsaved-parameter indicator) never fired for those interactions. onChange now dispatches a change event to cover this gap.
  • initSpinners() could be called multiple times on the same page (e.g. reopened modals), and the underlying ISpin library rewraps the input and rebinds its listeners unconditionally on every call, stacking duplicate wrappers/buttons and duplicate keydown/wheel listeners. Elements are now marked with an ispinned class (same pattern as tippied for tooltips) so they're skipped on subsequent calls.

@Salvialf Salvialf added the changelog-other Use to generate release notes label Jul 23, 2026
@Salvialf Salvialf added changelog-fix Use to generate release notes / changelog To be apply on PR and removed changelog-other Use to generate release notes labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-fix Use to generate release notes / changelog To be apply on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants