datepicker focus steal (for lack of better word)
Hi
I have an external js library that I use to create tooltips. That's all the library does.
I generate tooltip content dynamically depending on items the mouse hovers on. On this tooltip I use an input field to allow the user to choose a date. For date selection I use datepicker.
The problem:
The tooltip works in such a way that if the mouse goes out of the tooltip area, it will disappear. So when the mouse is moved to the datepicker, the tooltip is gone and only the date picker remains. What I noticed in Chrome, is that if I make an input field of type Date and dont use datepicker, Chrome will automatically add a datepicker to the input field and, most importantly, moving the mouse on that datepicker does not cause the tooltip to disappear. I would like to mimick the behaviour of datepicker in Chrome in other browsers, like Firefox.
Can this be done?
Also I've noticed:
The tooltip steals all mouse events so if I wanted to check if mouse was outside of some element I had to bind separately like this:
$("#element_id").mouseleave(function () { ... });