Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with input type="range" and v-model #51

Open
FranckFreiburger opened this issue Mar 4, 2019 · 2 comments
Open

error with input type="range" and v-model #51

FranckFreiburger opened this issue Mar 4, 2019 · 2 comments

Comments

@FranckFreiburger
Copy link

The following code:

	render(h) {
		return <input type="range" v-model={this.opacity}/>;
	},

fails with:

Module build failed (from ../node_modules/babel-loader/lib/index.js):
Cannot read property 'toLowerCase' of undefined

whereas replacing type="range" with type="number" works fine.

@nickmessing
Copy link
Member

This is very weird cause we have working tests for input[type="range"] vModel in tests..., can you create a reproduction?

@rkingon
Copy link

rkingon commented Jul 9, 2020

I can confirm this is still happening.

Workaround:
<input type="range" value={this.opacity} onInput={(e) => { this.opacity = e.target.value }} />

(tbh, i've been moving away from vModel anyway, I like the control you get with onInput (ie: maybe you don't want the value to be a string...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants