Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Responsive Flex Layout Chrome Bug #481

Closed
JaimeStill opened this issue Nov 2, 2017 · 6 comments · Fixed by #669
Closed

Responsive Flex Layout Chrome Bug #481

JaimeStill opened this issue Nov 2, 2017 · 6 comments · Fixed by #669
Assignees
Labels
has pr A PR has been created to address this issue P1 Urgent issue that should be resolved before the next re-lease

Comments

@JaimeStill
Copy link

JaimeStill commented Nov 2, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When moving from row to column layout, controls should stack appropriately

What is the current behavior?

In Chrome, when transitioning from row to column layout with an element that has a nested column layout, all of the elements merge onto the same line.

Examples

Chrome at gt-md
chrome-gt-md

Chrome at lt-lg
chrome-lt-lg

Firefox at lt-lg
firefox-lt-lg

What are the steps to reproduce?

Repro
All of the relevant markup is in test.component.html

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Tested with the following:
Angular 4.4.4
Material 2 beta 12
flex-layout 2 beta 10

Is there anything else we should know?

While the following causes the mess in Chrome, but works in Firefox and Edge:

<div fxFlex fxLayout="column" fxLayoutAlign="start stretch">

The following causes the intended behavior to work in all browsers:

<div fxLayout="column" fxLayoutAlign="start stretch" [ngStyle.gt-md]="{'flex': '1 1 auto'}">
@largeDachshund
Copy link

@JaimeStill , I tried to run your repro on edge and the editor can't render your app! The StackBlitz editor works fine on Chrome, but I think that defeats the purpose of your question. Have you been successful with flex-layout on Edge? I'm getting weird layouts, like super thin columns in Edge.

@JaimeStill
Copy link
Author

@largeDachshund , In Edge, opening the repro in full screen preview appropriately shows the app. However, opening the repro from the link above generates the following error for me when instantiating:

Fatal error:
Access is denied.

Evaluating https://unpkg.com/core-js@2.4.1/modules/_export.js
Evaluating https://unpkg.com/core-js@2.4.1/modules/es6.reflect.apply.js
Evaluating https://unpkg.com/core-js@2.4.1/es6/reflect.js
Evaluating polyfills.ts
Evaluating main.ts
Loading blitzapp

@largeDachshund
Copy link

@JaimeStill , thanks for the clarification.

@ThomasBurleson
Copy link
Contributor

We have a PR pending that should fix the use of flex-basis used with the fxFlex API.

@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.13 milestone Nov 28, 2017
@ThomasBurleson ThomasBurleson added the P1 Urgent issue that should be resolved before the next re-lease label Nov 28, 2017
@CaerusKaru
Copy link
Member

The fix without using the ngStyle is the following:

<div fxFlex="auto" fxLayout="column" fxLayoutAlign="start stretch">

We'll look into changing the default behavior, but for now this is the prescribed solution.

@CaerusKaru CaerusKaru self-assigned this Feb 25, 2018
@CaerusKaru CaerusKaru added the has pr A PR has been created to address this issue label Mar 16, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has pr A PR has been created to address this issue P1 Urgent issue that should be resolved before the next re-lease
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants