Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

master: md-dialog layout off when wrapping md-content & md-actions with form #2514

Closed
sheaujye opened this issue Apr 23, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@sheaujye
Copy link

Guys, this is what I have been doing, it was working until rc1, because my dialog acts like a form, i will need to put form submission buttons in md-actions.

<md-dialog class="dialog login" aria-label="Login" style="width: 400px" ng-controller="loginController">
    <form name="loginForm" ng-submit="submitForm()" novalidate>
        <md-content>
            <h2 class="md-title">
                <span translate>Login</span>
            </h2>
        </md-content>
                ...
        <div class="md-actions">
            <md-button type="button" ng-click="showDialog('request-pin')">
                <translate>Forgot Password</translate>
            </md-button>
            <md-button class="md-primary" ng-disabled="loginForm.$invalid">
                <translate>Login</translate>
            </md-button>
        </div>
    </form>
</md-dialog>

Removing form fixes the problem but I will need that for my app to work.

@sheaujye
Copy link
Author

financio

@sheaujye sheaujye changed the title master: md-dialog off when wrapping md-content & md-actions with form master: md-dialog layout off when wrapping md-content & md-actions with form Apr 23, 2015
@epelc
Copy link
Contributor

epelc commented Apr 23, 2015

+1 I also use this for my dialogs. I noticed it in a recent master from yesterday but I reverted to 0.9.0-rc2 after some other tests.

@marcysutton
Copy link
Contributor

Hi there, this was caused by a change to the CSS where md-content was too general and it affected nested components. To fix this, md-dialog now requires md-dialog-content as a child element instead of md-content. This is more consistent with md-card, which uses md-card-content.

@sheaujye
Copy link
Author

Hi @marcysutton ,

Sorry it is still not working, please refer to the original post and replace md-content with md-dialog-content, when we have another element in between, be it "form" or "div", "display: block" is being applied to that element while "md-dialog-content" became an inline elem, causing layout off.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants