演示: http: //www.christianbullock.com/so-demo/(我知道它有点生疏)。
截图:http: //i46.tinypic.com/2rh7fgn.png
将鼠标悬停在蓝色矩形上以显示登录面板。它完全按照我的意愿工作,除了如果您双击其中一个输入表单以显示先前输入的用户名,通过将鼠标悬停在建议的用户名之一上,面板就会消失......jQuery认为我的鼠标实际上没有离开 div。
有没有人遇到过这样的事情?有人知道修复吗?
谢谢。
演示: http: //www.christianbullock.com/so-demo/(我知道它有点生疏)。
截图:http: //i46.tinypic.com/2rh7fgn.png
将鼠标悬停在蓝色矩形上以显示登录面板。它完全按照我的意愿工作,除了如果您双击其中一个输入表单以显示先前输入的用户名,通过将鼠标悬停在建议的用户名之一上,面板就会消失......jQuery认为我的鼠标实际上没有离开 div。
有没有人遇到过这样的事情?有人知道修复吗?
谢谢。
Well the "autocomplete" plugin is going to add a <div>
to hold the completion strings, and I'm pretty sure it adds that div to the end of the <body>
content. Thus, when you mouse into that <div>
you really are mousing out of your own form.
You could maybe have your handler explicitly treat the autocomplete <div>
as being part of yours, or else you might be able to "move" the <div>
the plugin adds into your own.
edit — if your problem stems from the native browser "autocomplete" dropdown (which you may want to disable for a login form anyway, if you can; try adding an "autocomplete" attribute and set it to "false"), then here's a possibility: in the event handler that fades your form container, you can check the current mouse position. If the mouse position is still within the bounding box of your form, then you can ignore the "mouseout".