You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enable(), disable(), and readonly() methods ignore the silent parameter that other state-changing methods accept, causing them to always trigger change events even when silent mode is requested.
Steps to Reproduce
Create a Bootstrap Toggle
Call enable(true), disable(true), or readonly(true) with silent parameter set to true
Observe that change events are still triggered
Expected Behavior
The enable(), disable(), and readonly() methods should respect the silent parameter and not trigger change events when silent is true.
Actual Behavior
These methods ignore the silent parameter and always trigger change events through the apply() method which defaults silent to false.
Severity
Moderate
Bootstrap 5 Toggle Version
5.3.0-rc1
Bootstrap version
5.3.8
Other
Analysis: The bug occurs because enable(), disable(), and readonly() methods call apply() without passing the silent parameter. In the Toggle class, these methods have fixed signatures without the silent parameter, while methods like on(), off(), toggle(), etc., accept it.
Correction: Add the silent parameter to the enable(), disable(), and readonly() method signatures and pass it to the apply() method:
Activity
github-actions commentedon Jan 24, 2026
Hi! 👋
Thanks for your issue. You are helping to improve Bootstrap 5 toggle.
feat: add silent parameter support to enable, disable and readonly me…
feat: add silent parameter support to enable, disable and readonly me…