mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Position: set "at" option while align to cursor, fixes collision:flip not work with default value
This commit is contained in:
parent
abeb13af40
commit
a962d52902
@ -38,7 +38,8 @@ $.fn.position = function(options) {
|
|||||||
targetHeight = target.height();
|
targetHeight = target.height();
|
||||||
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|
||||||
} else if (options.of.preventDefault) {
|
} 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;
|
targetWidth = targetHeight = 0;
|
||||||
basePosition = { top: options.of.pageY, left: options.of.pageX };
|
basePosition = { top: options.of.pageY, left: options.of.pageX };
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user