如何在div元素下面隐藏文本光标

问题描述:

>

新增到CSS和javascript。

我有一个搜索文本框,可以添加任何搜索值。输入错误的值后,弹出一个div,并说没有找到记录(使用关闭按钮关闭div)。后我把我的光标放在文本框没有关闭弹出。我的光标显示在div框上方。

| ------------------ |搜索框

| ----- ------------- |

I am new to CSS and javascript.
I have one search text box in which I can add any search value. After entering a wrong value one pop up div comes and says "no records found" (with close button to close div). after I put my cursor on text box without closing pop up. my cursor displays above the div box.
|------------------|search box
|------------------|

我的文本框css属性。

My text box css properties.

z-index: 200630; position: absolute; width: 149px; height: 21px;
overflow: visible; top: 0px; cursor: default; left: 0px;

我的div元素css prop:

My div element css prop:

z-index: 201350; position: absolute; width: 270px; height: 20px;
overflow: hidden; top: 0px; cursor: default; left: 0px;

如何将光标隐藏在div元素下面。仅在IE中出现。

How to hide cursor below div element.Issue occurs only in IE

我创建了小jsfiddle.Issue发生在IE 8只有不是FF
http://jsfiddle.net/raj31/LUaej/1/

I have created small jsfiddle.Issue occur in IE 8 only not FF http://jsfiddle.net/raj31/LUaej/1/

我创建了一个小小提琴,我相信它会重现您的问题。

I've created a small fiddle, which I believe reproduces your problem.

我认为解决方案可能是简单的模糊搜索字段显示对话框,就像我在第三行(注释它,以获得你的问题):

I think the solution could be to simply blur search field on showing the dialog, like I did in the 3rd line (comment it out to get your problem):

 $('.seach').blur()