diff --git a/src/generators/dom/visitors/Element/Binding.js b/src/generators/dom/visitors/Element/Binding.js index efc5672ddb..e88fe8df43 100644 --- a/src/generators/dom/visitors/Element/Binding.js +++ b/src/generators/dom/visitors/Element/Binding.js @@ -120,12 +120,6 @@ export default function visitBinding ( generator, block, state, node, attribute ${generator.helper( 'addEventListener' )}( ${state.parentNode}, '${eventName}', ${handler} ); ` ); - if ( node.name === 'select' ) { - block.builders.create.addBlock( deindent` - ${updateElement} - ` ); - } - if ( node.name !== 'audio' && node.name !== 'video' ) node.initialUpdate = updateElement; if ( updateCondition !== null ) { diff --git a/src/generators/dom/visitors/Element/Element.js b/src/generators/dom/visitors/Element/Element.js index 8fce4734eb..190835b343 100644 --- a/src/generators/dom/visitors/Element/Element.js +++ b/src/generators/dom/visitors/Element/Element.js @@ -112,10 +112,6 @@ export default function visitElement ( generator, block, state, node ) { visit( generator, block, childState, child ); }); - if ( node.initialUpdate ) { - block.builders.create.addBlock( node.initialUpdate ); - } - if ( node.lateUpdate ) { block.builders.update.addLine( node.lateUpdate ); } @@ -124,6 +120,10 @@ export default function visitElement ( generator, block, state, node ) { const visitor = selectValueAttribute.type === 'Attribute' ? visitAttribute : visitBinding; visitor( generator, block, childState, node, selectValueAttribute ); } + + if ( node.initialUpdate ) { + block.builders.create.addBlock( node.initialUpdate ); + } } function getRenderStatement ( generator, namespace, name ) {