I have a form with a special widget that fills in a text input. When the text input has focus, the widget appears above the text input (intentionally above it) and the user clicks options in it, when they're done it disappears and fills in the input. There is a problem with this in IE, when the widget appears above the input, the field's caret (blinking text input cursor for the field) shows through the widget. The widget is a normal html/css dom structure. It still does this when I set the z-index for the widget to be above the text input. How can I get rid of the caret or make sure it doesn't shine through? I don't want to set the focus elsewhere for the duration that the widget is shown because the widget requires that the input has focus.
views:
176answers:
4
A:
Try setting the unselectable
attribute to on
while the widget is being shown, then to off
at the end. It's an IE specific attribute, and if it works you should check it in IE 8, as I'm not sure if it's still supported.
Ryan Lynch
2009-12-01 04:10:32
Still shows through. Nice suggestion though
perrierism
2009-12-01 04:38:42
A:
Seems to me that a simple blur
on that field or focus
on a field in the widget would fix your problem.
Justin Johnson
2009-12-01 05:32:01
A:
Do you have a URL example we can take a look at?
Based on what you describe, can you not set the CSS style for the container element to "display: none;"?
tonejac
2009-12-01 07:35:59
+1
A:
Similar to Ryan's answer, what if you set (and subsequently remove) the attribute disabled="disabled" ?
graphicdivine
2009-12-17 15:07:17