Thank you for the suggestion, but that still does not capture mouse events on the slider. I have not found a way to make the slider part of scene2. Here is what I have, the goal is to get the value of L (controlled by the slider) to change at mouseup, not when the slider is changing. That is, L should change only at the end of moving the slider (for reasons related to the larger program involved, which involves making a tone that does poorly if it tries to change continuously with the slider).
s = sphere(color=color.cyan)
show = label()
def view():
global L
show.text=L
scene.bind('mouseup', view)
scene2 = canvas(background=color.white)
scene2.autoscale = False
sphere(pos=vec(0,0,0), radius=0.1, opacity=0)
def view2():
global L
show.text = L
scene2.bind('mouseup', view2)
def L_change(s):
global L
L = s.value
l_caption.text = L
L = 1
scene2.append_to_title("\n\n\n")
Ls = slider(bind=L_change,min=0.2,max=5,value=L,pos=scene2.title_anchor)
l_caption = wtext(text = f"width = {L:.2f} nm\n\n")