From 2a92b3ad8eeeb6e82f197fe599929ee334c76f02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 29 May 2011 12:29:11 -0400 Subject: [PATCH] Tooltip: Change default collision detection to 'flip fit' since the default vertical positioning is centered and can't flip --- demos/tooltip/delegation-mixbag.html | 106 +++++++++++++++---------- tests/unit/tooltip/tooltip_defaults.js | 3 +- ui/jquery.ui.tooltip.js | 3 +- 3 files changed, 66 insertions(+), 46 deletions(-) diff --git a/demos/tooltip/delegation-mixbag.html b/demos/tooltip/delegation-mixbag.html index 9c524dabe..720071c87 100644 --- a/demos/tooltip/delegation-mixbag.html +++ b/demos/tooltip/delegation-mixbag.html @@ -1,62 +1,80 @@ + jQuery UI Tooltip - Default demo - - - - - - - - + + + + + + + -
- - - - - -
-
This is the footnote, including other elements
-
This is the other footnote, including other elements
+ +
+
+

St. Stephen's Cathedral

+

Vienna, Austria.

+
+ + St. Stephen's Cathedral + +
+ +
+
+

Tower Bridge

+

London, England.

+ + Tower Bridge + +
+ +

All images are part of Wikimedia Commons +and are licensed under CC BY-SA 3.0 by the copyright holder.

+
diff --git a/tests/unit/tooltip/tooltip_defaults.js b/tests/unit/tooltip/tooltip_defaults.js index 13daaeb67..ded3d4558 100644 --- a/tests/unit/tooltip/tooltip_defaults.js +++ b/tests/unit/tooltip/tooltip_defaults.js @@ -5,7 +5,8 @@ commonWidgetTests( "tooltip", { items: "[title]", position: { my: "left+15 center", - at: "right center" + at: "right center", + collision: "flip fit" }, tooltipClass: null, diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 279db69fa..c8d892d38 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -25,7 +25,8 @@ $.widget( "ui.tooltip", { items: "[title]", position: { my: "left+15 center", - at: "right center" + at: "right center", + collision: "flip fit" }, tooltipClass: null }, -- 2.39.5