material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[IE10] ListItem initiallyOpen error

Open valentinvichnal opened this issue 10 years ago • 8 comments

Problem Description

IE 9 and 10 worked fine with alpha versions, but using beta it throws the following error: Unable to get property 'initiallyOpen' of undefined or null reference You can test the documentation site to see the error: http://www.material-ui.com/v0.15.0-beta.1/

Versions

  • Material-UI: 0.15.0-beta.1
  • React: 15.0.1
  • Browser: IE 9-10

valentinvichnal avatar Apr 19 '16 21:04 valentinvichnal

I have the same issue

  • Material UI Version 0.15.0-beta.2
  • React 15.0.2
  • Browser IE 10
  • jeannei avatar May 06 '16 19:05 jeannei

    Also happens in the final release

    • Material UI version v0.15.0
    • React 15.0.2
    • Browser IE 10 (on Windows Server 2012)

    jonaslundgren avatar May 13 '16 06:05 jonaslundgren

    Any development about this issue?

    moduval avatar Jun 02 '16 17:06 moduval

    The issue is that IE doesn't like the javascript that babel generates. See https://babeljs.io/docs/usage/caveats/. Including the babel-polyfill package resolved this issue for me. Another workaround might be to apply the "loose" option in babel to generate more compatible javascript (http://babeljs.io/docs/plugins/transform-es2015-classes/).

    jonaslundgren avatar Jun 10 '16 08:06 jonaslundgren

    @jonaslundgren I tried your solution in my project but nothing worked for me. How have you configured your babel to make it work? IE10 doesn't seems to like that when we call this.props in state declaration.

    moduval avatar Jun 21 '16 19:06 moduval

    +1 for this issue. Any resolution?

    hackingbeauty avatar Jun 21 '16 22:06 hackingbeauty

    @moduv5 I modified the mateterial-ui source according to this: https://github.com/bkonkle/babel-preset-es2015-loose. For more background see https://babeljs.io/docs/usage/caveats/ and http://babeljs.io/docs/plugins/transform-es2015-classes/

    jonaslundgren avatar Jun 22 '16 08:06 jonaslundgren

    @hhaidar this can be fixed by moving the assignment of open into componentWillMount

    nathanmarks avatar Jun 30 '16 22:06 nathanmarks