ALL software version info
Software Version Info
Python 3.11.9
panel 1.5.2 (still working on 1.4.5)
bokeh 3.6.0
jupyterlab 4.2.5
Description of expected behavior and the observed behavior
Expected behaviour
Setting the disabled attribute of a widget to False should result in the widget being editable.
Observed behaviour
When the disabled attribute of widgets is set to True and then set to False, the attribute can be updated one more time and then fails to update further.
In the reproduction code below, clicking the Button named "toggle" once will see no change in disabled state. Clicking the "toggle" Button twice will see the state of the dummy widgets permanently set to disabled.
This behaviour occurs when the switching of states is done quickly (i.e. in a single function), but doesn't seem to occur when the switching is done in multiple cells of a notebook.
Complete, minimal, self-contained example code that reproduces the issue
import panel as pn
pn.extension()
dummy_button = pn.widgets.Button(name="dummy", button_type='primary')
dummy_text = pn.widgets.TextAreaInput()
toggle_button = pn.widgets.Button(name="toggle")
def toggle(_):
dummy_button.disabled = True
dummy_text.disabled = True
dummy_button.disabled = False
dummy_text.disabled = False
toggle_button.on_click(toggle)
layout = pn.Column(dummy_button, dummy_text, toggle_button)
layout.servable()
Screenshots or screencasts of the bug in action
Before first click

After first click

After second click

ALL software version info
Software Version Info
Description of expected behavior and the observed behavior
Expected behaviour
Setting the
disabledattribute of a widget toFalseshould result in the widget being editable.Observed behaviour
When the
disabledattribute of widgets is set toTrueand then set toFalse, the attribute can be updated one more time and then fails to update further.In the reproduction code below, clicking the Button named "toggle" once will see no change in disabled state. Clicking the "toggle" Button twice will see the state of the dummy widgets permanently set to disabled.
This behaviour occurs when the switching of states is done quickly (i.e. in a single function), but doesn't seem to occur when the switching is done in multiple cells of a notebook.
Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
Before first click



After first click
After second click