mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -07:00
r454
Исправление косяка отобрашения всплывающих суб-меню в Chrome git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@454 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
b16cb96b54
commit
88cb94d44e
1 changed files with 16 additions and 1 deletions
|
@ -244,8 +244,23 @@ var Menu = {
|
|||
setLocation: function() {
|
||||
var CSS = this.$root.offset();
|
||||
CSS.top += this.$root.height() + this.offsetCorrection_Y;
|
||||
var curTop = parseInt(CSS.top);
|
||||
var tCorner = $(document).scrollTop() + $(window).height() - 20;
|
||||
var maxVisibleTop = Math.min(curTop, Math.max(0, tCorner - this.$menu.height()));
|
||||
if (curTop != maxVisibleTop) {
|
||||
CSS.top = maxVisibleTop;
|
||||
}
|
||||
CSS.left += this.offsetCorrection_X;
|
||||
var curLeft = parseInt(CSS.left);
|
||||
var rCorner = $(document).scrollLeft() + $(window).width() - 6;
|
||||
var maxVisibleLeft = Math.min(curLeft, Math.max(0, rCorner - this.$menu.width()));
|
||||
if (curLeft != maxVisibleLeft) {
|
||||
CSS.left = maxVisibleLeft;
|
||||
}
|
||||
this.$menu.css(CSS);
|
||||
if (this.iframeFix) {
|
||||
$('iframe.ie-fix-select-overlap', $menu).css({ width: $menu.width(), height: $menu.height() });
|
||||
}
|
||||
},
|
||||
|
||||
fixLocation: function() {
|
||||
|
@ -287,7 +302,7 @@ var Menu = {
|
|||
showClickedMenu: function() {
|
||||
this.setLocation();
|
||||
this.$menu.css({display: 'block'});
|
||||
this.fixLocation();
|
||||
// this.fixLocation();
|
||||
this.activeMenuId = this.clickedMenuId;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue