From a7dd337a7225941aeb203628d249bb7b173a5471 Mon Sep 17 00:00:00 2001 From: SomeKittens Date: Sat, 15 Aug 2015 14:03:11 -0700 Subject: [PATCH] fix(expandable): fix #4156 by calling stopProp on subgrid scroll Previously, the stopPropagation function was not on scrollEvent, causing scrolling in subgrids to also scroll the main grid. This PR exposes stopProp and calls it on subgrid scroll fixes #4156 --- src/js/core/directives/ui-grid-render-container.js | 1 + src/js/core/services/ui-grid-util.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/core/directives/ui-grid-render-container.js b/src/js/core/directives/ui-grid-render-container.js index 2affeaf0f0..1499680258 100644 --- a/src/js/core/directives/ui-grid-render-container.js +++ b/src/js/core/directives/ui-grid-render-container.js @@ -113,6 +113,7 @@ } else { event.preventDefault(); + event.stopPropagation(); scrollEvent.fireThrottledScrollingEvent('', scrollEvent); } diff --git a/src/js/core/services/ui-grid-util.js b/src/js/core/services/ui-grid-util.js index f0fc33be36..bd7334f464 100644 --- a/src/js/core/services/ui-grid-util.js +++ b/src/js/core/services/ui-grid-util.js @@ -1393,7 +1393,8 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC deltaX: deltaX, deltaY: deltaY, deltaFactor: lowestDelta, - preventDefault: function () { event.preventDefault(); } + preventDefault: function () { event.preventDefault(); }, + stopPropagation: function () { event.stopPropagation(); } }; // Clearout lowestDelta after sometime to better