diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts index 7f28184e802b..8878af17d09c 100644 --- a/src/generators/dom/visitors/Element/Binding.ts +++ b/src/generators/dom/visitors/Element/Binding.ts @@ -51,10 +51,13 @@ export default function visitBinding( let setter = getSetter(block, name, snippet, state.parentNode, attribute, dependencies, value); let updateElement = `${state.parentNode}.${attribute.name} = ${snippet};`; + + const needsLock = node.name !== 'input' || !/radio|checkbox|range|color/.test(type); // TODO others? const lock = `#${state.parentNode}_updating`; - let updateCondition = `!${lock}`; + let updateConditions = needsLock ? [`!${lock}`] : []; + let readOnly = false; - block.addVariable(lock, 'false'); + if (needsLock) block.addVariable(lock, 'false'); // \ No newline at end of file