9

I have contenteditable div on which i have file drop and copy-paste image event. By using the color:transparent i am able to hide the blinking cursor on chrome browser. but in IE i came to know "The color of the text cursor in an input on IE is always the inverse of the background color". Source:How do I change the color of the text cursor in an input field in IE?

Is there any alternative way to disable a cursor or change the speed of blinking cursor so it looks like hidden in IE.

Community
  • 1
  • 1
AmolP
  • 91
  • 1
  • 3
  • Have you tried `cursor: none` on the element? This would work across all browsers. – Matthew Spence Sep 06 '16 at 09:13
  • The property "cursor: none " is for disappearing the mouse pointer cursor. I need to hide the blinking cursor which usually in textbox/textarea or contenteditable div. – AmolP Sep 06 '16 at 11:57

3 Answers3

9

You can do it in CSS with:

caret-color: transparent

Doesn't work in IE though. Here is browser support chart.

jcubic
  • 61,973
  • 54
  • 229
  • 402
Lewis Donovan
  • 889
  • 8
  • 19
1

You can do this for IE with this hack:

color: transparent;
text-shadow: 0 0 0 #333333;

You can replace the color (#333333) with whatever text color you need.

user2173353
  • 4,316
  • 4
  • 47
  • 79
0

Assuming you mean changing the caret cursor, otherwise known as the text cursor; there are solutions available, although support for IE is rather limited. Perhaps, if not already, you might find this of some use: Hide textfield blinking cursor

Community
  • 1
  • 1
Matthew Spence
  • 986
  • 2
  • 9
  • 27