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

HTML order. Input is last. #70

Open
igoriok1994 opened this issue Mar 19, 2020 · 3 comments
Open

HTML order. Input is last. #70

igoriok1994 opened this issue Mar 19, 2020 · 3 comments

Comments

@igoriok1994
Copy link

Hi,

Can you check HTML input's order like that.

image

It will be better, as I could properly use CSS tidle (~) selector to control handle.

Something like that:

input:focus ~ .react-switch-handle {........}
@igoriok1994
Copy link
Author

Or maybe you can make callbacks for onFocus and onBlur events?

@igoriok1994
Copy link
Author

Also, why input ref name is $inputRef for dev env and y for production?
How can I access input ref?
ReactDOM.findDOMNode is not a good practice.

@markusenglund
Copy link
Owner

No, I won't make that change. The invisible input element acts in lots of strange ways on different browsers and platforms. Changing the order might very well break something.

I didn't have in mind that someone would try to access the inputRef. As you noticed I've minified it in the production mode to save bytes.

Sorry for not responding earlier.

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

2 participants