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

Slider loses focus on change #7

Open
unindented opened this issue Feb 19, 2016 · 4 comments
Open

Slider loses focus on change #7

unindented opened this issue Feb 19, 2016 · 4 comments
Labels

Comments

@unindented
Copy link
Contributor

Example without MDL: http://jsfiddle.net/fsebyLz2/
Example with MDL: http://jsfiddle.net/stx4n4y8/

Use your keyboard to focus on the slider. With MDL, the slider loses focus on every change.

I can't figure out what could be causing this...

@unindented
Copy link
Contributor Author

Related to preactjs/preact#54? Although I can only repro the problem on Chrome and Safari, but not Firefox...

@developit
Copy link
Owner

I think this has something to do with component recycling. Working on a revamp of that right now.

@developit
Copy link
Owner

@unindented Alright, it looks like this is because of another one of MDL's lovely "wrapper" divs. When we're upgrading the input element to an MDL slider, they actually rip it out of the DOM and inject a div around it, which is going to get overwritten every time preact tries to reconcile the VTree against the DOM. This can be fixed by creating the wrapper div in preact-mdl's Slider component. Might be a bit before I can PR a fix.

@developit developit added the bug label Feb 19, 2016
@developit
Copy link
Owner

hate to dredge up an old thread, but this will be fixed here in order to fix compatibility with preact@beta, which no longer removes unknown elements by default.

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

No branches or pull requests

2 participants