Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect window mouse leave on TideSDK apps

Tags:

tidesdk

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.

like image 211
lorenzo-s Avatar asked Oct 22 '22 09:10

lorenzo-s


1 Answers

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
}
like image 172
procek Avatar answered Nov 29 '22 07:11

procek