Skip to content

Fix issue #533#575

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

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

Conversation

@CrOrc
Copy link
Copy Markdown
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
Copy Markdown

xemasiv commented Nov 2, 2017

👍 for this

@ADagen
Copy link
Copy Markdown

ADagen commented Dec 18, 2017

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

wmertens commented Jan 8, 2019

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

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

CrOrc commented Mar 14, 2019

See #696 Change Response's statusText's default

@superzadeh
Copy link
Copy Markdown

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

ntucker commented Feb 22, 2021

This breaks jest timer mocks

@ntucker
Copy link
Copy Markdown

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

@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