diff options
author | Tooru Fujisawa <arai.unmht@gmail.com> | 2015-03-11 00:38:35 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-03-11 00:38:35 +0100 |
commit | 19643ae8e32cdbf49f7d0fb7ece6f68786acc0b5 (patch) | |
tree | 66f078b6fbfaead95f71bbc249f6a90ab6e1d659 | |
parent | 5b9f16e2e746c7dfa775bb956caf70ced56275c6 (diff) | |
download | bugzilla-19643ae8e32cdbf49f7d0fb7ece6f68786acc0b5.tar.gz bugzilla-19643ae8e32cdbf49f7d0fb7ece6f68786acc0b5.tar.xz |
Bug 1140764: "suggested reviewers" menu overflows from visible area if there are many revirewers.
-rw-r--r-- | js/jquery/plugins/contextMenu/contextMenu-min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/jquery/plugins/contextMenu/contextMenu-min.js b/js/jquery/plugins/contextMenu/contextMenu-min.js index 3f6ce1938..cbcc9146e 100644 --- a/js/jquery/plugins/contextMenu/contextMenu-min.js +++ b/js/jquery/plugins/contextMenu/contextMenu-min.js @@ -3,7 +3,7 @@ _cleanData(elems);};} var $currentTrigger=null,initialized=false,$win=$(window),counter=0,namespaces={},menus={},types={},defaults={selector:null,appendTo:null,trigger:"right",autoHide:false,delay:200,reposition:true,determinePosition:function($menu){if($.ui&&$.ui.position){$menu.css('display','block').position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css('display','none');}else{var offset=this.offset();offset.top+=this.outerHeight();offset.left+=this.outerWidth()/2-$menu.outerWidth()/2;$menu.css(offset);}},position:function(opt,x,y){var $this=this,offset;if(!x&&!y){opt.determinePosition.call(this,opt.$menu);return;}else if(x==="maintain"&&y==="maintain"){offset=opt.$menu.position();}else{offset={top:y,left:x};} var bottom=$win.scrollTop()+$win.height(),right=$win.scrollLeft()+$win.width(),height=opt.$menu.height(),width=opt.$menu.width();if(offset.top+height>bottom){offset.top-=height;} -if(offset.left+width>right){offset.left-=width;} +if(offset.top<0){offset.top=0;}if(offset.left+width>right){offset.left-=width;}if(offset.left<0){offset.left=0;} opt.$menu.css(offset);},positionSubmenu:function($menu){if($.ui&&$.ui.position){$menu.css('display','block').position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css('display','');}else{var offset={top:0,left:this.outerWidth()};$menu.css(offset);}},zIndex:1,animation:{duration:50,show:'slideDown',hide:'slideUp'},events:{show:$.noop,hide:$.noop},callback:null,items:{}},hoveract={timer:null,pageX:null,pageY:null},zindex=function($t){var zin=0,$tt=$t;while(true){zin=Math.max(zin,parseInt($tt.css('z-index'),10)||0);$tt=$tt.parent();if(!$tt||!$tt.length||"html body".indexOf($tt.prop('nodeName').toLowerCase())>-1){break;}} return zin;},handle={abortevent:function(e){e.preventDefault();e.stopImmediatePropagation();},contextmenu:function(e){var $this=$(this);e.preventDefault();e.stopImmediatePropagation();if(e.data.trigger!='right'&&e.originalEvent){return;} if($this.hasClass('context-menu-active')){return;} |