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

removes check for touch devices when detecting disabled state #174

Merged
merged 1 commit into from
Nov 9, 2016

Conversation

viktoriyavulfson
Copy link
Contributor

No description provided.

@majapw
Copy link
Collaborator

majapw commented Nov 9, 2016

So the reason this check is here is not to pop up the keyboard on mobile devices. I was thinking about changing this to readOnly={isTouchDevice} to try and solve this issue. Can you check if the component works if you change it that way?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 86.271% when pulling 458306f on plangrid:master into 8aff40e on airbnb:master.

@viktoriyavulfson
Copy link
Contributor Author

viktoriyavulfson commented Nov 9, 2016

@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}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@viktoriyavulfson
Copy link
Contributor Author

👍

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.293% when pulling e77d8ac on plangrid:master into 8aff40e on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.293% when pulling e77d8ac on plangrid:master into 8aff40e on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@majapw majapw merged commit 462c8bb into react-dates:master Nov 9, 2016
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

Successfully merging this pull request may close these issues.

3 participants