1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-08 23:24:19 +00:00

Fix bug where a disabled ToggleButton could be toggled using screen readers

This commit is contained in:
attila 2025-11-25 18:33:30 +01:00 committed by Attila Szarvas
parent fd1c29e56b
commit 07f801143c

View file

@ -171,7 +171,7 @@ void Button::setToggleState (bool shouldBeOn, NotificationType notification)
void Button::setToggleState (bool shouldBeOn, NotificationType clickNotification, NotificationType stateNotification)
{
if (shouldBeOn != lastToggleState)
if (isEnabled() && shouldBeOn != lastToggleState)
{
WeakReference<Component> deletionWatcher (this);