-
Notifications
You must be signed in to change notification settings - Fork 772
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
Get Error while using "calc" for fxFlex in IE 11 #323
Comments
@Apaltaratski - without a plunker this is not a valid issue. Please provide a Plunkr demo. |
Have problems with plunker on IE11 ... |
Thx @Apaltaratski. You have presented a general flexbox CSS problem; without the use of @angular/flex-layout. General discussion and how-to questions should be posted to the community forum areas: Closing this issue as 'invalid'. Thank you. |
I am seeing an issue with the following code:
Only in IE11 I get the following error:
Angular 4.2.4 If I remove the calc() the errors go away. |
@martinmcwhorter - please install the nightly build a retest. See NPM Install Nightly Build.
|
I installed the nightly builds and retested. Issue still exists. Repro steps: Use fxFlex with the calc function:
Stack trace: ERROR Error: Unspecified error.
"ERROR"
{
[functions]: ,
__proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
ngDebugContext: {
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: {
[functions]: ,
__proto__: { },
bank: { }
},
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
},
number: -2147467259,
stack: "Error: Unspecified error.
at DefaultDomRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:110096:9)
at BaseAnimationRenderer.prototype.setStyle (http://localhost:4200/vendor.bundle.js:112127:5)
at DebugRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:71951:5)
at Anonymous function (http://localhost:4200/vendor.bundle.js:73181:9)
at applyMultiValueStyleToElement (http://localhost:4200/vendor.bundle.js:73177:1)
at applyStyleToElement (http://localhost:4200/vendor.bundle.js:73168:1)
at BaseFxDirective.prototype._applyStyleToElement (http://localhost:4200/vendor.bundle.js:73431:5)
at FlexDirective.prototype._updateStyle (http://localhost:4200/vendor.bundle.js:74701:5)
at FlexDirective.prototype.ngOnChanges (http://localhost:4200/vendor.bundle.js:74673:9)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.bundle.js:69087:5)"
}
ERROR CONTEXT [object Object]
"ERROR CONTEXT"
{
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
}
ERROR Error: Unspecified error.
"ERROR"
{
[functions]: ,
__proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
ngDebugContext: { },
number: -2147467259,
stack: "Error: Unspecified error.
at DefaultDomRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:110096:9)
at BaseAnimationRenderer.prototype.setStyle (http://localhost:4200/vendor.bundle.js:112127:5)
at DebugRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:71951:5)
at Anonymous function (http://localhost:4200/vendor.bundle.js:73181:9)
at applyMultiValueStyleToElement (http://localhost:4200/vendor.bundle.js:73177:1)
at applyStyleToElement (http://localhost:4200/vendor.bundle.js:73168:1)
at BaseFxDirective.prototype._applyStyleToElement (http://localhost:4200/vendor.bundle.js:73431:5)
at FlexDirective.prototype._updateStyle (http://localhost:4200/vendor.bundle.js:74701:5)
at FlexDirective.prototype.ngOnChanges (http://localhost:4200/vendor.bundle.js:74673:9)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.bundle.js:69087:5)"
}
ERROR CONTEXT [object Object]
"ERROR CONTEXT"
{
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
}
ERROR Error: Unspecified error.
"ERROR"
{
[functions]: ,
__proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
ngDebugContext: { },
number: -2147467259,
stack: "Error: Unspecified error.
at DefaultDomRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:110096:9)
at BaseAnimationRenderer.prototype.setStyle (http://localhost:4200/vendor.bundle.js:112127:5)
at DebugRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:71951:5)
at Anonymous function (http://localhost:4200/vendor.bundle.js:73181:9)
at applyMultiValueStyleToElement (http://localhost:4200/vendor.bundle.js:73177:1)
at applyStyleToElement (http://localhost:4200/vendor.bundle.js:73168:1)
at BaseFxDirective.prototype._applyStyleToElement (http://localhost:4200/vendor.bundle.js:73431:5)
at FlexDirective.prototype._updateStyle (http://localhost:4200/vendor.bundle.js:74701:5)
at FlexDirective.prototype.ngOnChanges (http://localhost:4200/vendor.bundle.js:74673:9)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.bundle.js:69087:5)"
}
ERROR CONTEXT [object Object]
"ERROR CONTEXT"
{
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
}
ERROR Error: Unspecified error.
"ERROR"
{
[functions]: ,
__proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
ngDebugContext: { },
number: -2147467259,
stack: "Error: Unspecified error.
at DefaultDomRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:110096:9)
at BaseAnimationRenderer.prototype.setStyle (http://localhost:4200/vendor.bundle.js:112127:5)
at DebugRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:71951:5)
at Anonymous function (http://localhost:4200/vendor.bundle.js:73181:9)
at applyMultiValueStyleToElement (http://localhost:4200/vendor.bundle.js:73177:1)
at applyStyleToElement (http://localhost:4200/vendor.bundle.js:73168:1)
at BaseFxDirective.prototype._applyStyleToElement (http://localhost:4200/vendor.bundle.js:73431:5)
at FlexDirective.prototype._updateStyle (http://localhost:4200/vendor.bundle.js:74701:5)
at FlexDirective.prototype.ngOnChanges (http://localhost:4200/vendor.bundle.js:74673:9)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.bundle.js:69087:5)"
}
ERROR CONTEXT [object Object]
"ERROR CONTEXT"
{
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
}
ERROR Error: Unspecified error.
"ERROR"
{
[functions]: ,
__proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
ngDebugContext: { },
number: -2147467259,
stack: "Error: Unspecified error.
at DefaultDomRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:110096:9)
at BaseAnimationRenderer.prototype.setStyle (http://localhost:4200/vendor.bundle.js:112127:5)
at DebugRenderer2.prototype.setStyle (http://localhost:4200/vendor.bundle.js:71951:5)
at Anonymous function (http://localhost:4200/vendor.bundle.js:73181:9)
at applyMultiValueStyleToElement (http://localhost:4200/vendor.bundle.js:73177:1)
at applyStyleToElement (http://localhost:4200/vendor.bundle.js:73168:1)
at BaseFxDirective.prototype._applyStyleToElement (http://localhost:4200/vendor.bundle.js:73431:5)
at FlexDirective.prototype._updateStyle (http://localhost:4200/vendor.bundle.js:74701:5)
at FlexDirective.prototype.ngOnChanges (http://localhost:4200/vendor.bundle.js:74673:9)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.bundle.js:69087:5)"
}
ERROR CONTEXT [object Object]
"ERROR CONTEXT"
{
[functions]: ,
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
} |
This is definatly an error, which prevents IE11 from rendering the site properly. How does this get flagged only "minor" ??? |
My app is broken on IE because of that... |
@ThomasBurleson, the issue is related with usage of shorthand syntax for If all flex-box properties are explicitly provided, it should works completely fine. For example, this one will fail:
But, if there's a way to specify all properties explicitly, e.g:
...it should works! I think that there should be a check, when Is this included in any coming build? If not, I'd create a commit for that. |
@kvitozev as I sad 14 of July, it is work as you sad. Also this problem can be resolved like flex: 1 0 calc(100% - 14px); To flex: 1 0 auto;
width: calc(100% - 14px); Note: width/height, required to identify by flex-direction |
Thx! I totally missed that statement. I'll give it a try. |
Definitely a problem with how ng-Flexlayout is dealing with fxFlex="calc(100% -65px)" attributes in IE11. The above works fine in Chrome, FF and Edge In IE11 my Angular app will not even load if it comes across that syntax. Remove the fxFlex (whenever calc is being used) and replace with a class that implements the same calc statement and it fixes IE11. For now I have done just that and removed all calc statements inside fxFlex attributes. Reproducible in "@angular/flex-layout": "^2.0.0-beta.9", |
@BondiGeek yes, and this will means that you have two realization of layout one in html and one in scss/css. |
Here is the plunker for this issue: To reproduce, open the plunker in both chrome and IE. |
On Chrome, this is working without any errors using the latest code on HEAD. See the StackBlitz demo.
|
Please note that now the shorthand notation `fxFlex="calc(20% - 20px)" uses CSS injection with out the shorthand version and instead is using individual properties: flex-grow: 1;
flex-shrink: 1;
flex-basis: "calc(20% - 20px)"; Does this demo still manifest errors in IE? If so, you could use this: flex: 1 1 auto;
width: "calc(20% - 20px)"; Granted this is a CSS workaround, which also works in Chrome: I realize, this is a manual workaround that we should automate in the library. So let's see if we can have an IE-specific workaround in Beta.11 |
@Apaltaratski - does the issue in IE still manifest using the above StackBlitz demo ?
|
@ThomasBurleson currently not able to test IE with new version. Sorry for that |
@ThomasBurleson
|
* Fix for when flex-basis is unitless and 0 * Fix for when no width/height is applied and flex-basis should be set * Fix for IE flex-basis with calc values * Fix for SSR properties set to 0 Fixes angular#277 Fixes angular#280 Fixes angular#323 Fixes angular#528 Fixes angular#534
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When I trying to use "calc" in 'fxFlex' I can see only unexpected error (problem reproduce in IE 11).
It seems that "flex-basis" cannot be created with "calc" (requires more investigation).
The text was updated successfully, but these errors were encountered: