Cursor is not displayed on text fields

2019-08-14 12:58发布

问题:

in this page: http://www.legrandclub.net there are two text fields. In all web browser all works fine but in Internet Explorer the cursor is not displayed when I click on one of two text fields, it's possible to write some text but the cursor is not displayed.

Which could be the cause of this problem?

Thanks

回答1:

They're using the same background color on the input field as the cursor is (gray).



回答2:

This issue in IE < 9 was caused by adding padding to the left in my input fields. It was fixed by adding

input { padding-right:3px;}

to the stylesheet, where padding left was also 3px. This pushed the cusror back to where it is now visible.



回答3:

I encountered the same problem and this is the issue: You should be handling the 'focus' event on that text field, so on tab focus in IE you will not see the cursor. For that you should also bind focusin; then it will work. The following is the sample code

$('search-large').bind('focus focusin', function () {

Hope it helps...



回答4:

I solved the same problem by removing

padding:0;

from CSS.