Commit 8becfd90 authored by Phil Hughes's avatar Phil Hughes

Merge branch '9721-cannot-scroll-forwards-in-time-for-roadmap-view-ce' into 'master'

CE Port of fix for roadmap forward timeline scroll

See merge request gitlab-org/gitlab-ce!25217
parents 7b84ec00 123da431
......@@ -130,7 +130,7 @@ export const isInViewport = (el, offset = {}) => {
rect.top >= (top || 0) &&
rect.left >= (left || 0) &&
rect.bottom <= window.innerHeight &&
rect.right <= window.innerWidth
parseInt(rect.right, 10) <= window.innerWidth
);
};
......
......@@ -855,6 +855,7 @@ describe('common_utils', () => {
});
it('returns true when provided `el` is in viewport', () => {
el.setAttribute('style', `position: absolute; right: ${window.innerWidth + 0.2};`);
document.body.appendChild(el);
expect(commonUtils.isInViewport(el)).toBe(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment