Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(thumbnails): Replace remove method that is unsupported in IE11 #1323

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

jstoffan
Copy link
Collaborator

I considered polyfilling the method on the Element prototype, but decided against it to avoid further altering global objects.

@jstoffan jstoffan requested a review from a team as a code owner January 29, 2021 00:22

virtualScroller.totalItems = 10;
virtualScroller.itemHeight = 10;
virtualScroller.margin = 0;
virtualScroller.scrollingEl = scrollingEl;

stubs.isVisible = jest.spyOn(virtualScroller, 'isVisible').mockImplementation();
stubs.removeChild = jest.spyOn(virtualScroller.anchorEl, 'removeChild').mockImplementation();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? Not sure I see it being used in any test

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not really. I did it so it would fit in better with the other spy on the line above. I can remove it if it's concerning.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not concerning, already approved

@jstoffan jstoffan merged commit 3c37b79 into box:master Jan 29, 2021
@jstoffan jstoffan deleted the fix-element-remove branch January 29, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants