summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-02-14 18:25:02 +0100
committerAleksander Machniak <alec@alec.pl>2014-02-14 18:25:02 +0100
commitabecca8f4bc0898f952a3362bd42b4c78ac783c3 (patch)
treecf1f70fee183c64f2da2f0d7b09afd055b41c0ab /program/js/app.js
parentc6227fe7b08e2371f07250261a464cb86fdbc9d4 (diff)
parent80102a2dde8d2870ee7d8c4ad8e8626a555ecc2f (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 1ef341415..eb9b9ced8 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6670,8 +6670,9 @@ function rcube_webmail()
this.element_position = function(element, obj)
{
var obj = $(obj), win = $(window),
- width = obj.width(),
- height = obj.height(),
+ width = obj.outerWidth(),
+ height = obj.outerHeight(),
+ menu_pos = obj.data('menu-pos'),
win_height = win.height(),
elem_height = $(element).height(),
elem_width = $(element).width(),
@@ -6679,6 +6680,13 @@ function rcube_webmail()
top = pos.top,
left = pos.left + width;
+ if (menu_pos == 'bottom') {
+ top += height;
+ left -= width;
+ }
+ else
+ left -= 5;
+
if (top + elem_height > win_height) {
top -= elem_height - height;
if (top < 0)