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 issue #533 #575

Merged
merged 5 commits into from
Jun 1, 2020
Merged

Conversation

CrOrc
Copy link
Contributor

@CrOrc CrOrc commented Oct 23, 2017

As stated in petkaantonov/bluebird#1161, resolving a promise in an XHR callback without active DOM operations will not trigger the promise chain to execute. But wrapping fetch promise resolution in setTimeout magically resolves it.

Experienced this issue with different promise polyfills: bluebird, es6-promise, core-js/fn/promise

Adding setTimeout fixes #533.

@xemasiv
Copy link

xemasiv commented Nov 2, 2017

👍 for this

@ADagen
Copy link

ADagen commented Dec 18, 2017

Hey guys, let's move on.

@wmertens
Copy link

👍 looks great, we still have to support IE11 so I don't understand why this is not merged?

@ILoveITScience
Copy link

Whats the status of the issue? We also have to suport IE 11 and need this fix.

@wmertens
Copy link

wmertens commented Jan 8, 2019

@mislav what is your opinion of this?

@ILoveITScience
Copy link

I'm testing https://github.com/stefanpenner/es6-promise at the moment. It seem to fix my problem.

@dasa
Copy link

dasa commented Jan 9, 2019

This may no longer be an issue in newer versions of IE 11. I'm not able to repo using the test at: https://github.com/lowkay/MutationObserverSchedulerBug

@CrOrc
Copy link
Contributor Author

CrOrc commented Mar 13, 2019

Errors in build are not caused by my changes

HeadlessChrome 73.0.3683 (Linux 0.0.0) native Response default status is 200 OK FAILED
HeadlessChrome 73.0.3683 (Linux 0.0.0) native Response default status is 200 OK when an explicit undefined status code is passed FAILED

Default native response statusText is '' instead of 'OK' for (Headless)Chrome 73.0.3683.
Everything seems to work for HeadlessChrome 72.0.3626 (Windows 7.0.0).

See Chromium Issue 907441: Change Response's statusText's default

@CrOrc
Copy link
Contributor Author

CrOrc commented Mar 14, 2019

See #696 Change Response's statusText's default

@superzadeh
Copy link

superzadeh commented Sep 24, 2019

Any update on this? I'm also running into the bug described in #533 and would need this. I know IE is never fun, but our customers don't have a choice unfortunately.

@nomnom11
Copy link

what is this problem

@JakeChampion JakeChampion merged commit 74e4fe8 into JakeChampion:master Jun 1, 2020
@CrOrc CrOrc deleted the CrOrc-fix-resolve-IE-11 branch June 14, 2020 17:35
@ntucker
Copy link

ntucker commented Feb 22, 2021

This breaks jest timer mocks

@ntucker
Copy link

ntucker commented Feb 22, 2021

setTimeout() here is only called after resolution. but the promise exposed here doesn't resolve until after it is finished. Therefore, there's no way to tell jest to advance the setTimeout timer, since it isn't a timer to advance until a time to which there is no user level hookup

Copy link

@aldarmak aldarmak left a comment

Choose a reason for hiding this comment

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

Is it the key

Repository owner locked as resolved and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In IE11 resolve is not always executed