Skip to content

Fix issue #533#575

Merged
JakeChampion merged 5 commits into
JakeChampion:masterfrom
CrOrc:CrOrc-fix-resolve-IE-11
Jun 1, 2020
Merged

Fix issue #533#575
JakeChampion merged 5 commits into
JakeChampion:masterfrom
CrOrc:CrOrc-fix-resolve-IE-11

Conversation

@CrOrc

@CrOrc CrOrc commented Oct 23, 2017

Copy link
Copy Markdown
Contributor

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

xemasiv commented Nov 2, 2017

Copy link
Copy Markdown

👍 for this

@ADagen

ADagen commented Dec 18, 2017

Copy link
Copy Markdown

Hey guys, let's move on.

@wmertens

Copy link
Copy Markdown

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

@ILoveITScience

Copy link
Copy Markdown

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

@wmertens

wmertens commented Jan 8, 2019

Copy link
Copy Markdown

@mislav what is your opinion of this?

@ILoveITScience

Copy link
Copy Markdown

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

@dasa

dasa commented Jan 9, 2019

Copy link
Copy Markdown

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

CrOrc commented Mar 13, 2019

Copy link
Copy Markdown
Contributor Author

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

CrOrc commented Mar 14, 2019

Copy link
Copy Markdown
Contributor Author

See #696 Change Response's statusText's default

@superzadeh

superzadeh commented Sep 24, 2019

Copy link
Copy Markdown

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
Copy Markdown

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

ntucker commented Feb 22, 2021

Copy link
Copy Markdown

This breaks jest timer mocks

@ntucker

ntucker commented Feb 22, 2021

Copy link
Copy Markdown

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

@aldarmak aldarmak left a comment

Copy link
Copy Markdown

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