Merged 9.2.11.
commit
df8f0cebe3
File diff suppressed because one or more lines are too long
|
@ -144,7 +144,12 @@ $.fn.position = function( options ) {
|
|||
options = $.extend( {}, options );
|
||||
|
||||
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
|
||||
target = $( options.of ),
|
||||
|
||||
// Make sure string options are treated as CSS selectors
|
||||
target = typeof options.of === "string" ?
|
||||
$( document ).find( options.of ) :
|
||||
$( options.of ),
|
||||
|
||||
within = $.position.getWithinInfo( options.within ),
|
||||
scrollInfo = $.position.getScrollInfo( within ),
|
||||
collision = ( options.collision || "flip" ).split( " " ),
|
||||
|
|
|
@ -434,7 +434,11 @@
|
|||
const collision = (options.collision || 'flip').split(' ');
|
||||
const offsets = {};
|
||||
|
||||
const target = $(options.of);
|
||||
// Make sure string options are treated as CSS selectors
|
||||
const target =
|
||||
typeof options.of === 'string'
|
||||
? $(document).find(options.of)
|
||||
: $(options.of);
|
||||
const dimensions = getDimensions(target);
|
||||
const targetWidth = dimensions.width;
|
||||
const targetHeight = dimensions.height;
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
var scrollInfo = $.position.getScrollInfo(within);
|
||||
var collision = (options.collision || 'flip').split(' ');
|
||||
var offsets = {};
|
||||
var target = $(options.of);
|
||||
var target = typeof options.of === 'string' ? $(document).find(options.of) : $(options.of);
|
||||
var dimensions = getDimensions(target);
|
||||
var targetWidth = dimensions.width;
|
||||
var targetHeight = dimensions.height;
|
||||
|
|
Loading…
Reference in New Issue