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.

2
  • Have you tried cursor: none on the element? This would work across all browsers. Sep 6, 2016 at 9: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 6, 2016 at 11:57

3 Answers 3

9

You can do it in CSS with:

caret-color: transparent

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

4
  • 2
    True, but will still help others who end up here from a Google search Oct 10, 2018 at 11:29
  • 2
    This was helpful, didn't search for IE and this what came up (first in google). This is exactly what I was searching for. Thanks.
    – jcubic
    Jan 4, 2019 at 11:23
  • Glad I could help. Thanks for the support chart as well. Jan 7, 2019 at 11:22
  • and I am looking for an IE solution specifically and your answer is just a noizzze.
    – Dominik
    May 16, 2019 at 16:55
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.

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

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.