From a962d52902bdccbd9d91ecc419750c0d5d3abcac Mon Sep 17 00:00:00 2001 From: Chi Cheng Date: Sun, 2 Aug 2009 16:17:07 +0000 Subject: [PATCH] Position: set "at" option while align to cursor, fixes collision:flip not work with default value --- ui/ui.position.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/ui.position.js b/ui/ui.position.js index 54adffd0c..587c0ce0c 100644 --- a/ui/ui.position.js +++ b/ui/ui.position.js @@ -38,7 +38,8 @@ $.fn.position = function(options) { targetHeight = target.height(); basePosition = { top: target.scrollTop(), left: target.scrollLeft() }; } else if (options.of.preventDefault) { - options.at = "left top"; // while align to cursor, "at" default value "center" causes "collision:flip" not work. + // while align to cursor, "at" default value "center" causes "collision:flip" not work + options.at = "left top"; targetWidth = targetHeight = 0; basePosition = { top: options.of.pageY, left: options.of.pageX }; } else { -- 2.39.5