diff --git a/src/compile/render-dom/wrappers/Element/Binding/InputRangeBinding.ts b/src/compile/render-dom/wrappers/Element/Binding/InputRangeBinding.ts index 78681d41b3..473776fece 100644 --- a/src/compile/render-dom/wrappers/Element/Binding/InputRangeBinding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding/InputRangeBinding.ts @@ -1,9 +1,11 @@ import InputNumberBinding from './InputNumberBinding'; import Binding from '../../../../nodes/Binding'; import Element from '../../../../nodes/Element'; +import Block from '../../../Block'; +import ElementWrapper from '..'; export default class InputRangeBinding extends InputNumberBinding { - events = ['input', 'change']; + events = ['change', 'input']; static filter( node: Element, @@ -16,4 +18,13 @@ export default class InputRangeBinding extends InputNumberBinding { binding_lookup.value ); } + + constructor( + block: Block, + element: ElementWrapper, + binding_lookup: Record + ) { + super(block, element, binding_lookup); + this.needsLock = false; + } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 9af41b7382..2fb03e4a33 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -180,22 +180,24 @@ export default class ElementWrapper extends Wrapper { if (node.intro || node.outro) { if (node.intro) block.addIntro(); if (node.outro) block.addOutro(); - this.cannotUseInnerHTML(); } if (node.animation) { block.addAnimation(); - this.cannotUseInnerHTML(); } - if (node.actions.length > 0) this.cannotUseInnerHTML(); - if (node.bindings.length > 0) this.cannotUseInnerHTML(); - if (node.classes.length > 0) this.cannotUseInnerHTML(); - if (node.handlers.length > 0) this.cannotUseInnerHTML(); - if (node.ref) this.cannotUseInnerHTML(); - - if (renderer.options.dev) { - this.cannotUseInnerHTML(); // need to use addLoc + if (this.parent) { + if (node.actions.length > 0) this.parent.cannotUseInnerHTML(); + if (node.animation) this.parent.cannotUseInnerHTML(); + if (node.bindings.length > 0) this.parent.cannotUseInnerHTML(); + if (node.classes.length > 0) this.parent.cannotUseInnerHTML(); + if (node.intro || node.outro) this.parent.cannotUseInnerHTML(); + if (node.handlers.length > 0) this.parent.cannotUseInnerHTML(); + if (node.ref) this.parent.cannotUseInnerHTML(); + + if (renderer.options.dev) { + this.parent.cannotUseInnerHTML(); // need to use addLoc + } } this.fragment = new FragmentWrapper(renderer, block, node.children, this, stripWhitespace, nextSibling); diff --git a/test/runtime/index.js b/test/runtime/index.js index 465b9f71ac..7e16f4d179 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -25,7 +25,7 @@ function getName(filename) { return base[0].toUpperCase() + base.slice(1); } -describe.only("runtime", () => { +describe("runtime", () => { before(() => { svelte = loadSvelte(false); svelte$ = loadSvelte(true);