[BUGFIX] Context menu is not completely visible in filelist with scrollbar 92/54392/2
authorGianluigi Martino <gmartino27@gmail.com>
Fri, 13 Oct 2017 06:31:56 +0000 (08:31 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 13 Oct 2017 12:49:18 +0000 (14:49 +0200)
If the foldertree in filelist is to long, the rightclick context menu on
the bottom of the window is not completly visible. With this patch the
position of the menu is calculated based on the windows width and height
and so completly visible.

Resolves: #82732
Releases: master, 8.7
Change-Id: Ied9204371491059efda61143e9ca9c2f3c8a9b9d
Reviewed-on: https://review.typo3.org/54392
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/ContextMenu.js

index 057c275..e1ca31e 100644 (file)
@@ -165,8 +165,8 @@ define(['jquery', 'TYPO3/CMS/Backend/ContextMenuActions'], function ($, ContextM
         var x = this.mousePos.X;
         var y = this.mousePos.Y;
         var dimsWindow = {
-            width: $(document).width() - 20, // saving margin for scrollbars
-            height: $(document).height()
+            width: $(window).width() - 20, // saving margin for scrollbars
+            height: $(window).height()
         };
 
         // dimensions for the context menu