mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Fixes issue with comments options menu [SCI-530]
This commit is contained in:
parent
cbc14d9d50
commit
37cff75013
1 changed files with 5 additions and 3 deletions
|
@ -165,7 +165,7 @@ var Comments = (function() {
|
|||
}
|
||||
|
||||
function initCommentOptions(scrollableContainer, useParentOffset) {
|
||||
if ( ! _.isUndefined(typeof useParentOffset) ) {
|
||||
if ( ! _.isUndefined(useParentOffset) ) {
|
||||
useParentOffset = useParentOffset;
|
||||
} else {
|
||||
useParentOffset = true;
|
||||
|
@ -179,8 +179,10 @@ var Comments = (function() {
|
|||
var $el = $(this);
|
||||
var menu = $el.find('.dropdown-menu');
|
||||
var leftPos = $el.offset().left;
|
||||
var parentTopPos = $el.offset().top;
|
||||
if (leftPos + menu.width() > $(window).width()) {
|
||||
menu.offset({ left: leftPos - menu.width() });
|
||||
menu.offset({ left: leftPos - menu.width(),
|
||||
top: (parentTopPos + 20)});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -197,7 +199,7 @@ var Comments = (function() {
|
|||
}
|
||||
|
||||
function scrollCommentOptions(selector, useParentOffset) {
|
||||
if ( ! _.isUndefined(typeof useParentOffset) ) {
|
||||
if ( ! _.isUndefined(useParentOffset) ) {
|
||||
useParentOffset = useParentOffset;
|
||||
} else {
|
||||
useParentOffset = true;
|
||||
|
|
Loading…
Reference in a new issue