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

Collection of items aren't loading on demos for IE10 #269

Closed
jasonlee-alation opened this issue Jun 7, 2016 · 8 comments
Closed

Collection of items aren't loading on demos for IE10 #269

jasonlee-alation opened this issue Jun 7, 2016 · 8 comments
Labels

Comments

@jasonlee-alation
Copy link

The demo page on ie10 isn't loading its collection of items for all demos except 'Collection'. This is leading to empty grids/tables/virtual scrolls

This was tested on Browserstack windows 8 ie10.
From what I understand react-virtualized does support ie10 judging from the -ms- vendor specific flex attributes
screen shot 2016-06-07 at 2 58 57 pm

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

Right. Unfortunately I think this is because Babel is using Object.setPrototypeOf which is not supported by IE9 / IE10. As for options to fix this, there's the Babel plugin babel-plugin-transform-proto-to-assign. There's also a polyfill. There's also a more compact monkey patch that resolves it:

(function() {
    if (!(Object.setPrototypeOf || {}.__proto__)) {
        var nativeGetPrototypeOf = Object.getPrototypeOf;

        Object.getPrototypeOf = function(object) {
            if (object.__proto__) {
                return object.__proto__;
            } else {
                return nativeGetPrototypeOf.call(Object, object);
            }
        }
    }
})();

I should probably update the demo app to at least monkey patch it.

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

Related to babel/babelify/issues/133 and #242

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

Let me think on this a bit. :)

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

I think the reason this recently broke was that I added ScalingCellSizeAndPositionManager which extends CellSizeAndPositionManager and sometimes calls super methods. Unfortunately as the Babel caveats page specifies:

Classes (10 and below)

If you’re inheriting from a class then static properties are inherited from it via proto, this is widely supported but you may run into problems with much older browsers.

NOTE: proto is not supported on IE <= 10 so static properties will not be inherited. See the protoToAssign for a possible work around.

For classes that have supers, the super class won’t resolve correctly. You can get around this by enabling the loose option in the es2015-classes plugin.

There are a couple of ways of fixing this. Need to decide which is the best. :)

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

I think the path of least pain for react-virtualized users would be for me to convert to composition for these 2 libraries now. Working on that currently.

@bvaughn bvaughn closed this as completed in 01d29eb Jun 8, 2016
@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

Check out version 7.3.3. Should work again for IE10+

Thanks for the detailed bug report, @jasonlee-alation. Sorry it took me a few hours to get around to resolving it. :)

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

PS Apparently my most recent deploy of the demo site is causing IE10 some other pain (not yet sure why) but this has to do with the bundling of my demo app itself. The local version of the demo app (with the update to react-virtualized) is IE10-compatible so hopefully this should unblock you. It's late here but I'll take a look at the demo site again tomorrow.

@bvaughn
Copy link
Owner

bvaughn commented Jun 8, 2016

Demo page has been fixed for IE9 and IE10. :)

@bvaughn bvaughn added the bug label Jun 8, 2016
ryanashcraft pushed a commit to amplitude/react-virtualized that referenced this issue Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants