Skip to content
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

Modal backdrop not disappearing (1.2 compat issue?) #65

Open
fvandillen opened this issue Oct 15, 2015 · 3 comments
Open

Modal backdrop not disappearing (1.2 compat issue?) #65

fvandillen opened this issue Oct 15, 2015 · 3 comments

Comments

@fvandillen
Copy link

I have a template which is called from a tabular data table, which has a button to call an update modal.

<template name="WildsoortEditKnop">
    {{> autoformModals}}

    {{#afModal class="btn btn-primary" collection="Wildsoorten" operation="update" doc=editID}}
        Wijzigen
    {{/afModal}}
</template>

The schema is presented and it allows me to edit the document. The update completes succesfully and the modal disappears, however not its backdrop, forcing me to reload the page in order to continue.

Could this be a 1.2 compatibility issue or could this be caused by a faulty style/js elsewhere?

@richardgsands
Copy link

+1 this happens for me with delete modal

@noahsw
Copy link

noahsw commented Feb 7, 2016

+1 on delete modal. My use case is I redirect the user with FlowRouter.go once the document is no longer found in the collection. The redirect works fine but the backdrop stays.

@chris-jamieson
Copy link

+1 I am also experiencing this (on an update form in my case).

A quick and dirty workaround is to set a form ID and then hide the modal overlay in the autoform hook, like this:

<template name="templateName">
    {{> autoformModals}}
    {{#afModal doc=this._id class="btn btn-default" collection="CollectionName" operation="update" formId="yourFormId" }} Click this button {{/afModal}}
</template>

Then in your Autoform hooks:

AutoForm.hooks({
    yourFormId: {
        onSuccess: function (error, result) {
            $('.modal-backdrop').hide();
        }
    }
});

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

No branches or pull requests

4 participants