I set focus to an edit control and don’t do anything else. When I run the web app, this cursor is at the edit control but blinks much faster than normal. It is more like jittering or flickering than blinking. What might be the cause of this behavior and how do I prevent it? I want a blinking cursor, or a non-blinking cursor in the textbox but not a flickering one.
Thanks.
I set focus to an edit control and don’t do anything else. When I
Share
The cursor blink rate isn’t something you can control by Javascript. It’s an accessibility setting set by either the Operating System or the Browser itself. Likely, what you’re seeing is something that is either reflective of that setting, or as Brandon Boone suggests, a side effect of other Javascript happening on the page.
Here’s what I’d do to narrow it down:
If it’s a browser or OS issue, it can be easily checked by rendering an input on an empty html page (there’s nothing special about ASP.NET text box controls–they get translated to input elements when they get served).
Put your cursor in that text box. If you see the same behavior, it’s an accessibility setting by the browser or OS. If not, then check your code and see if you’re doing some particularly nasty JavaScript that may be rather intensive. Also, try it from other browsers and see if perhaps it’s just a particular browser issue.