Search code examples
tidesdk

Detect window mouse leave on TideSDK apps


I'm developing my first app using TideSDK. I have some toolbar-like buttons, and I want them to fade out when mouse left the window.

Unfortunately looks like TideSDK does not fire mouseout or mouseleave events on window object, and I cannot detect it using mousemove because obviously mousemove events are not fired when cursor is out of the main application window.

I didn't found any mouse related event for Ti.UI.UserWindow in TideSDK official documentation.

Anybody got some ideas?
Thanks.


Solution

  • I have the same problem in TideSDK. On Chrome or Firefox window.onmouseleave works fine, but not on TideSDK (stupid old Webkit) :( But... You can use CSS and :hover on #wrapper inside :) You can move #wrapper for 1px on every side (by position: fixed for example), then you have write something like this:

    #wrapper:hover #myelement{
    // some CSS
    }