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

modal.visible is not set to false when closing modal via data-dismiss. #245

Open
erieflin opened this issue Jun 25, 2018 · 1 comment
Open

Comments

@erieflin
Copy link

erieflin commented Jun 25, 2018

After upgrading to angular 6 and updating this package I have started to notice an issue.

When closing a modal via data dismiss="modal" on an internal html element, the visible parameter is never set to false. However, the modal does actually become hidden.

This prevents opening the same modal later, as well as preventing standard lifecycle emitters from triggering (onHide, onClose, and onDismiss).

Additionally, we have had cases where these half open modals prevent the scrollbar from loading after angular navigation.

If a click is added in which the visible parameter is forcibly set to false , modal behavior operates as normal.

The html below

<bs-modal [animation]="_animation" data-keyboard="false" [backdrop]="_backdrop" #modal > <bs-modal-header [ngClass]="_headerClass" > <button type="button" data-dismiss="modal" aria-label="Close">{{_dialogbuttonname}}</button> </bs-modal-header> </bs-modal>

leaves the modal stuck "visible" the first time, and can be fixed by changing the button to

<button type="button" data-dismiss="modal" aria-label="Close" (click) ="modal.visible = false">{{_dialogbuttonname}}</button>

@ppsdang
Copy link

ppsdang commented Aug 10, 2018

I am also facing the same issue, even I have not upgraded my project to angular 6. which is currently on angular 5.

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

2 participants