Fix Firefox problem. close #1271

This patch fix the blink problem with FF, by changing the positionning of tooltips, which by the way reflects more the Cocoa behaviour.
This commit is contained in:
Antoine Mercadal committed 2011-05-18 19:30:16 +02:00
1 parent 27a1c5e9a4
commit 5a7c38d6eb
1 file changed
+3 -4
+3 -4
View File
@@ -168,7 +168,7 @@ var _CPToolTipHeight = 24.0,
if (mousePosition.y < 0)
mousePosition.y = 5;
if (mousePosition.y + CPRectGetHeight([self frame]) > nativeRect.size.height)
mousePosition.y = nativeRect.size.height - CPRectGetHeight([self frame]) - 5;
mousePosition.y = mousePosition.y - CPRectGetHeight([self frame]) - 40;
[self setFrameOrigin:mousePosition];
[self orderFront:nil];
@@ -207,7 +207,6 @@ var _CPToolTipHeight = 24.0,
[self _invalidateToolTip];
};
if (_toolTip)
{
if (_DOMElement.addEventListener)
@@ -257,7 +256,7 @@ var _CPToolTipHeight = 24.0,
{
[_CPCurrentToolTipTimer invalidate];
if (_CPCurrentToolTip)
[_CPCurrentToolTip close:nil];
[_CPCurrentToolTip close];
_CPCurrentToolTip = nil;
}
@@ -289,7 +288,7 @@ var _CPToolTipHeight = 24.0,
- (void)_showToolTip:(CPTimer)aTimer
{
if (_CPCurrentToolTip)
[_CPCurrentToolTip close:nil];
[_CPCurrentToolTip close];
_CPCurrentToolTip = [_CPToolTip toolTipWithString:_toolTip];
}