diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-10 11:25:03 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-10 11:25:03 +0000 |
| commit | dd87afada9c03859ea1d13817d139250c07f1ac4 (patch) | |
| tree | 33f2c6d5a55de1dd6ee1117825a1ccfe80d1869f | |
| parent | 6288a70c3a50cdf635d0fcdbf79b450c3f1165c5 (diff) | |
- Align drop down menus under main button (#1487048)
git-svn-id: https://svn.roundcube.net/trunk@4070 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 82f7c1562..d5e38d5cd 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -124,9 +124,12 @@ show_popupmenu: function(popup, show) show = false; if (show && ref) { - var pos = $(ref).offset(); + var parent = $(ref).parent(), + pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset(); + if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight) above = true; + obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) }); } |
