diff --git a/src/ReactiveTools.jl b/src/ReactiveTools.jl index 79d2e148..48eac328 100644 --- a/src/ReactiveTools.jl +++ b/src/ReactiveTools.jl @@ -960,8 +960,10 @@ macro onbutton(location, var, expr) known_vars = vcat(known_reactive_vars, known_non_reactive_vars) var = fieldnames_to_fields(var, known_vars) + expr, used_vars = mask(expr, known_vars) + expr = fieldnames_to_fields(expr, known_non_reactive_vars) - expr = fieldnames_to_fieldcontent(expr, known_reactive_vars, known_reactive_vars) + expr = fieldnames_to_fieldcontent(expr, known_reactive_vars) expr = unmask(expr, known_vars) ex = :(onbutton($var) do