I have a blue background in my Cordova based iOS project due to which my cursor is not properly visible in iPhone device.So if anyone faced this please tell me How to change the textfield cursor color in Cordova iOS project or if any HTML attribute to change this tint color
textfield code in index.html:
<input type="text" placeholder="First Name" id='regFName' />
Try the css attribute
caret-color
, it's working for me.try this ,
for background-color user ur screen background color and for colore use white colore
hope this will work for u!!
Sujania - you just need to add the class "cursor" to your input type.
Then the CSS will apply as you would expect!
Solution 1: Setting the
android:textCursorDrawable
attribute to@null
should result in the use ofandroid:textColor
as the cursor color.Attribute
textCursorDrawable
is available in API level 12 and higherSolution 2: With iOS 7 you can simply change
tintColor
property of theUITextField
. This will affect both the color of the text cursor and the text selection highlight color.You can do this in code...
textField.tintColor = [UIColor redColor]
;... or in Interface Builder:
Solution 3: In your
EditText
properties, there is an attributeandroid:textCursorDrawable
Now set it to
@null
like,android:textCursorDrawable="@null"
So now your
EditText
Cursor
is same as yourEditText
TextColor
.Solution 4: Use an image along with CSS cursor property, I don't see any need of JavaScript here...
To change the color of the cursor, write css for the cursor as follows: