From 713a3ef51fbca29221a204694a80d343bfa28b8f Mon Sep 17 00:00:00 2001 From: Jack Zhang Date: Tue, 7 Feb 2017 10:45:46 -0800 Subject: [PATCH] Add user select none to prevent cursor on ios safari The readonly attribute on touch inputs hides the keyboard, but recently the cursor started appearing. Adding touch events removes the flashing cursor. https://github.com/Dogfalo/materialize/issues/2448 Also moved unprefixed properties last --- css/CalendarMonth.scss | 2 +- css/DateInput.scss | 7 +++++++ css/DayPickerNavigation.scss | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/css/CalendarMonth.scss b/css/CalendarMonth.scss index 1b8fc30934..2ef5dffbcc 100644 --- a/css/CalendarMonth.scss +++ b/css/CalendarMonth.scss @@ -17,10 +17,10 @@ border-spacing: 0; } - user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; + user-select: none; } .CalendarMonth--horizontal { diff --git a/css/DateInput.scss b/css/DateInput.scss index a94b8f8dbf..78c01ee35e 100644 --- a/css/DateInput.scss +++ b/css/DateInput.scss @@ -50,6 +50,13 @@ $caret-top: $react-dates-spacing-vertical-picker - $react-dates-width-tooltip-ar border: 0; height: 100%; width: 100%; + + &[readonly] { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + } } .DateInput__display-text { diff --git a/css/DayPickerNavigation.scss b/css/DayPickerNavigation.scss index 2bdb179df3..a5e1d88080 100644 --- a/css/DayPickerNavigation.scss +++ b/css/DayPickerNavigation.scss @@ -4,10 +4,10 @@ .DayPickerNavigation__next { cursor: pointer; line-height: 0.78; - user-select: none; -webkit-user-select: none; /* Chrome/Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE10+ */ + user-select: none; } .DayPickerNavigation__prev--default,