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

Fix blinking cursor on iOS #304

Merged
merged 1 commit into from
Feb 7, 2017

Conversation

moonboots
Copy link
Collaborator

to: @majapw @ljharb

Removes the blinking cursor appearing in DateInput on iOS by adding user-select: none; (recommended as a workaround in another project). This PR should resolve the "Blinking cursor in mobile" issue.

Here's a gif of the blinking cursor and "Done" bottom bar:
ios-cursor-flash

@@ -50,6 +50,13 @@ $caret-top: $react-dates-spacing-vertical-picker - $react-dates-width-tooltip-ar
border: 0;
height: 100%;
width: 100%;

&[readonly] {
user-select: none;
Copy link
Member

Choose a reason for hiding this comment

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

the standard property should always go last, so that it takes precedence in browsers that support both.

@majapw
Copy link
Collaborator

majapw commented Feb 7, 2017

LGTM after @ljharb's comment is addressed. Thanks for this, @moonboots!

@majapw
Copy link
Collaborator

majapw commented Feb 7, 2017

Cool. Can you squash the commits into one before we merge tho?

The readonly attribute on touch inputs hides the keyboard, but recently
the cursor started appearing. Adding touch events removes the flashing
cursor.

Dogfalo/materialize#2448

Also moved unprefixed properties last
@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.501% when pulling 844ce6d on moonboots:touch-input-fix into 57dcbaf on airbnb:master.

@ljharb ljharb added the semver-patch: fixes/refactors/etc Anything that's not major or minor. label Feb 7, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.501% when pulling 844ce6d on moonboots:touch-input-fix into 57dcbaf on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.501% when pulling 844ce6d on moonboots:touch-input-fix into 57dcbaf on airbnb:master.

@moonboots moonboots merged commit 8a0c56d into react-dates:master Feb 7, 2017
@moonboots moonboots deleted the touch-input-fix branch February 7, 2017 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch: fixes/refactors/etc Anything that's not major or minor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants