diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts index a93b2b4048..94b8ea444d 100644 --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -309,7 +309,7 @@ const preprocessors = { stripWhitespace: boolean, nextSibling: Node ) => { - if (node.name === 'slot') { + if (node.name === 'slot' || node.name === 'option') { cannotUseInnerHTML(node); } @@ -369,8 +369,6 @@ const preprocessors = { // so that if `foo.qux` changes, we know that we need to // mark `bar` and `baz` as dirty too if (node.name === 'select') { - cannotUseInnerHTML(node); - const value = node.attributes.find( (attribute: Node) => attribute.name === 'value' ); diff --git a/test/runtime/samples/binding-select-optgroup/_config.js b/test/runtime/samples/binding-select-optgroup/_config.js new file mode 100644 index 0000000000..0d651b6654 --- /dev/null +++ b/test/runtime/samples/binding-select-optgroup/_config.js @@ -0,0 +1,39 @@ +export default { + skip: true, // JSDOM + + html: ` +