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

New Zoom component breaks IE11 support in v6.1.x #13272

Closed
stu039 opened this issue Nov 25, 2020 · 3 comments
Closed

New Zoom component breaks IE11 support in v6.1.x #13272

stu039 opened this issue Nov 25, 2020 · 3 comments
Assignees
Milestone

Comments

@stu039
Copy link

stu039 commented Nov 25, 2020

Bug or support request summary

A function that is part of the new Zoom component that was introduced as part of this PR #12845 , seems to be breaking storybook addon-docs in IE11. (See screenshots below for errors seen)

The issue originates from the function shown in screenshot below
Screenshot 2020-11-25 at 17 16 49 (file lib/components/src/Zoom/Zoom.tsx)

The DOMImplementation.createHTMLDocument() function takes a string as an argument that is the title of the document, however this is non-optional in IE. One can however, pass an empty string to this function which resolves the error.

Steps to reproduce

Run storybook with addon-docs enabled, load it in IE11.

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 6.1.5
  • @storybook/addons: 6.1.5

Affected platforms

Internet Explorer 11

Screenshots / Screencast / Code Snippets (Optional)

Errors seen in browser:
Screenshot 2020-11-25 at 15 13 26
Screenshot 2020-11-25 at 15 13 35
Passing an empty string to the function achieves the same result, and will work in IE11. See below for suggested fix:

window.document.implementation.createHTMLDocument("").body.style.zoom !== undefined;
@stu039 stu039 changed the title New Zoom component breaks IE11 support New Zoom component breaks IE11 support in v6.1.5 Nov 25, 2020
@stu039 stu039 changed the title New Zoom component breaks IE11 support in v6.1.5 New Zoom component breaks IE11 support in v6.1.x Nov 25, 2020
@stu039
Copy link
Author

stu039 commented Nov 25, 2020

Also note, this can be reproduced in the live storybook app in IE11 here is a link for an example docs page that errors - https://next--storybookjs.netlify.app/official-storybook/?path=/docs/addons-a11y-basebutton--default

@tooppaaa
Copy link
Contributor

@stu039 Awesome detective job ! Thanks

@shilman shilman added this to the 6.1.x milestone Nov 27, 2020
@shilman
Copy link
Member

shilman commented Nov 27, 2020

Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.8 containing PR #13302 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants