Question

If I have an HTML input field like this one:

<input type="text" id="mytextfield"/>

all browsers seem to show the caret (insertion point) in the field. Is is possible to prevent this from appearing by applying some CSS or javascript?

(My reason for asking is that my input is the basis of a GWT-Ext combo box like the ones on http://www.gwt-ext.com/demo/#linkedComboBox - you can't type in it, but you can still see the caret, which is annoying).

Was it helpful?

Solution

What you could try is disable the input element and explicitly set its color to black:

<input type="text" disabled="disabled" style="color: black;" ... />

This should work for the GWT-Ext combo box (at least it did when setting the attributes in firebug).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top