LP#1402797 Attach the context menu to the body for proper coordinate mapping
authorMike Rylander <mrylander@gmail.com>
Mon, 9 Feb 2015 21:42:47 +0000 (16:42 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 25 Feb 2015 16:16:08 +0000 (11:16 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/services/grid.js

index f5fbc4e..f5f1237 100644 (file)
@@ -491,7 +491,7 @@ angular.module('egGridMod',
             }
 
             $scope.hideActionContextMenu = function () {
-                var menu_dom = $($scope.grid_element).find('.grid-action-dropdown')[0];
+                var menu_dom = $('body').find('.grid-action-dropdown')[0];
                 $(menu_dom).css({
                     display: '',
                     width: $scope.action_context_width,
@@ -510,7 +510,7 @@ angular.module('egGridMod',
                 $scope.action_context_x = $(menu_dom).css('left');
                 $scope.action_context_parent = $(menu_dom).parent();
 
-                $($scope.grid_element).append($(menu_dom));
+                $('body').append($(menu_dom));
                 $('body').bind('click.remove_context_menu', $scope.hideActionContextMenu);
 
                 $(menu_dom).css({