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
This commit is contained in:
commit
8becfd9092
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue