mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-08 06:50:15 -03:00
fix(widget): restore strength drag on lora entries and header
widget.value is a getter/setter that returns a new array on every read, so handleStrengthDrag with updateWidget=false mutated a discarded copy. Introduce __dragActive flag to suppress renderLoras in setValue during drag, allowing mutations to persist through widget.value without destroying the DOM. Use try-finally to guarantee flag cleanup.
This commit is contained in:
@@ -751,7 +751,11 @@ export function addLorasWidget(node, name, opts, callback) {
|
||||
}
|
||||
}
|
||||
|
||||
renderLoras(widgetValue, widget);
|
||||
// Skip DOM re-render during drag to preserve pointer capture and event listeners.
|
||||
// The strength inputs are updated directly via the pointermove handler instead.
|
||||
if (!widget.__dragActive) {
|
||||
renderLoras(widgetValue, widget);
|
||||
}
|
||||
},
|
||||
hideOnZoom: true,
|
||||
selectOn: ['click', 'focus']
|
||||
|
||||
Reference in New Issue
Block a user