Skip to content

fix: prevent sidebar resize listener accumulation - #153

Closed
dajiaohuang wants to merge 1 commit into
adminkit:mainfrom
dajiaohuang:fix/sidebar-resize-listener-growth
Closed

dajiaohuang wants to merge 1 commit into
adminkit:mainfrom
dajiaohuang:fix/sidebar-resize-listener-growth

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Register the sidebar's transition listener once during initialization instead of creating another listener on every toggle. Filter bubbling transition events to the sidebar's own margin-left transition before dispatching the resize event. This prevents the resize work from growing on every open/close cycle and avoids dispatches for unrelated child/property transitions.

The checked-in demo bundle and source map are regenerated from the source change.

Evidence

A synthetic DOM harness loaded the actual src/js/modules/sidebar.js with mocked sidebar/toggle elements. Before the fix, two toggles followed by one sidebar margin-left transition each produced 3 resize events; after, they produced 2. The harness also injected unrelated left/right and descendant color transition events; those produced no extra resize events.

Validation

  • npm run build — passed; refreshed static/js/app.js and its source map.
  • node --check static/js/app.js — passed.
  • Synthetic listener regression harness — passed.
  • git diff --check — passed.
  • Targeted ESLint could not start: the repository .eslintrc uses unknown environment key es7 with installed ESLint 8.57.1. No config workaround was applied.

No application server, hosted service, production tenant/data, real account, or external API was used. No screenshot was captured; validation is the synthetic event-level reproduction.

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@dajiaohuang is attempting to deploy a commit to the Bootlab BV Team on Vercel.

A member of the Team first needs to authorize it.

@paullaros

Copy link
Copy Markdown
Contributor

Thank you! v4.0.0 rewrote sidebar.js, and the transitionend listener now removes itself after it fires once. That fixes the problem, so closing this.

@paullaros paullaros closed this Oct 28, 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