You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This hapens, when the body has max-width or somethink like that.
You need to calculate the position, relative to the offsetParent of the opt.$menu
QuickFix:
Rewrite the else on line 172:
position: function(opt,x,y){varoffset;// determine contextMenu positionif(!x&&!y){opt.determinePosition.call(this,opt.$menu);return;}elseif(x==='maintain'&&y==='maintain'){// x and y must not be changed (after re-show on command click)offset=opt.$menu.position();}else{// x and y are given (by mouse event)offset={top: y,left: x};}
to:
}else{// x and y are given (by mouse event)//but.. they are fixed x and y .. so we need to get the offsetParent's position to recalculate for our absolute positionvaroffsetParentOffset=opt.$menu.offsetParent().offset();offset={top: y-offsetParentOffset.top,left: x-offsetParentOffset.left};}
as you can see, this fix is only used, when x and y are present from mouse event
EDIT:
changed from position() to offset()
The text was updated successfully, but these errors were encountered:
This hapens, when the body has
max-width
or somethink like that.You need to calculate the position, relative to the
offsetParent
of theopt.$menu
QuickFix:
Rewrite the
else
on line172
:to:
as you can see, this fix is only used, when x and y are present from mouse
event
EDIT:
changed from position() to offset()
The text was updated successfully, but these errors were encountered: