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

Doesn't work in IE11 #109

Closed
altano opened this issue Apr 20, 2015 · 19 comments
Closed

Doesn't work in IE11 #109

altano opened this issue Apr 20, 2015 · 19 comments

Comments

@altano
Copy link

altano commented Apr 20, 2015

It looks like MutationObserver isn't firing in IE11. Paste this into the console:

ES6Promise.Promise.resolve("hello").then(function(v){console.log(v);});

This won't fire. If I then paste this:

setTimeout(function(){},1);

Then both the setTimeout event AND the .then() callback function get called. This must be some kind of IE bug? I couldn't find anyone reporting it though so I must be mistaken?

@altano
Copy link
Author

altano commented Apr 20, 2015

Also worth noting: $$asap$$flush WILL get called immediately if I set a breakpoint in es6-promise on the line that changes node.data. If I disable the breakpoint, $$asap$$flush doesn't get called. Bizarre, right?

@stefanpenner
Copy link
Owner

Woah. Maybe a mutation observer related quirk? This seems gnarly. I'll take a look in the AM

@edoloughlin
Copy link

Any update on this?

@stefanpenner
Copy link
Owner

Sorry this slipped my queue I'll take a look today crap, i let this slip. I need to finish a talk today, I will add a sticky note to my desk to dig in... This appears extremely crappy, my apologies for letting it linger.

@stefanpenner
Copy link
Owner

I am unfortunately unable to reproduce this issue. :(
this is very strange, investigating.

@stefanpenner
Copy link
Owner

So, this is interesting.

this only appears to be an issue, when using the console. The same code outside of the console works as expected. Hence why no app I work on demonstrates issues on IE11.

It appears MutationObserver changes just queue up when the console is open. They flush when a setTimeout occurs. But when debugging everything appears fine.

@stefanpenner
Copy link
Owner

Also, if you merely "click" anywhere in the page, the queue flushes..

@stefanpenner
Copy link
Owner

MessageChannel appears to work correctly... We could force IE11 to use this instead.

@stefanpenner
Copy link
Owner

I suspect the resolution is to:

  1. switch to MessageChannel
  2. report the bug upstream.

@JF10R
Copy link

JF10R commented Jun 22, 2015

Any update on the issue? You're saying it's related to the console... do you mean simply having the console/dev tools opened, or using the console javascript object (console.log()) ?

I'm facing a similar issue with the promise not resolving correctly on IE11 and I'm wondering if this is the problem.

@stefanpenner
Copy link
Owner

This is only the result of triggering a change from the console. So when a dev attempts to debug a promise via the developer console. They must tap the web view to flush the changes. This is clearly and ie11 bug. Although to save the sanity of dev, we may want to migrate to message channel for async.

If the change did not originate from the console, I have very high confidence that it is not a bug with this library. As its extensive test suite runs without issue on ie11.

To summarize, this does not affect normal app usage. Only some circumstances in the ie11 dev console do issues arise.

@stefanpenner
Copy link
Owner

So we have a choice to make, we can revert to use the wrong async in IE11, or deal with it. Both options really do suck..

cc @jdalton I tried to report this but with IE11, but the login sequence kept erroring with me. Do you have any thoughts or suggestions here?

cc @domenic Also curious if you have some advice. Let me know if i should provide more context.

@domenic
Copy link
Contributor

domenic commented Aug 10, 2015

I would say deal with it; devs should be deving for Edge hopefully. Maybe add a loud warning.

@stefanpenner
Copy link
Owner

Maybe add a loud warning.

sniff the version and console.log something ?

if your seeing this, please call your local M$ representative and complain violently.

@domenic
Copy link
Contributor

domenic commented Aug 10, 2015

Yeah or just in the readme. But that is probably better.

@JF10R
Copy link

JF10R commented Aug 12, 2015

Either solution would probably fit everyone's needs. IE11 will be forgotten soon enough with Edge being pushed out so much.

@stefanpenner
Copy link
Owner

I can likely also give a function to force the lib to some other async. Something the dev can run right after seeing the message so debugging isn't horrible

@jdalton
Copy link

jdalton commented Aug 12, 2015

FWIW I can't repro the issue on Win 10 IE 11 using http://static.iamstef.net/es6-promise/ or ES6Promise.Promise.resolve("hello").then(function(v){console.log(v);});. Both log.

Also confirmed it works on my Win 10 VM and https://remote.modern.ie/ too.
Works as in cannot repro bug.

@stefanpenner
Copy link
Owner

Works as in cannot repro bug.

If this is accurate, then awesome. Maybe some patch addressed this.

I am going to close the issue, as @jdalton someone who works on IE/chakra is unable to reproduce. I would say the problem is fixed.

If someone can demonstrate another scenario that fails we will gladly reopen.

@jdalton / @domenic thanks for your help

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

No branches or pull requests

6 participants