-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
removes check for touch devices when detecting disabled state #174
Conversation
So the reason this check is here is not to pop up the keyboard on mobile devices. I was thinking about changing this to |
458306f
to
4968be6
Compare
@majapw you're right, adding readonly attribute prevents the keyboard from popping up. Updated PR to set readonly for touch enabled devices. Tested on surface tablet |
@@ -121,7 +121,8 @@ export default class DateInput extends React.Component { | |||
placeholder={placeholder} | |||
autoComplete="off" | |||
maxLength={10} | |||
disabled={disabled || this.isTouchDevice} | |||
disabled={disabled} | |||
readonly={this.isTouchDevice} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be camel case - https://facebook.github.io/react/docs/dom-elements.html#all-supported-html-attributes
…lies readonly for touch
4968be6
to
e77d8ac
Compare
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.