Ngx-bootstrap: Modal created via ModalService is not hidden after calling .hide()

Created on 7 Feb 2018  路  3Comments  路  Source: valor-software/ngx-bootstrap

Bug description or feature request:

Calling the hide() function on a modal will not hide it if it's not shown fully. This means that if I open a dialog to signal a usually long loading server call which finishes too fast (faster than the modal animation) the hide() will be called but has no effect. You can see this in my demo with three manual delays. At no or small delays the dialog just stays open, at 150ms it isn't even shown properly and at 250ms it works as expected. Another interesting behaviour is that opening many dialogs and closing them fast will leave the GUI unclickable (E.g. in my demo by clicking and holding ctrl+2).

Plunker/StackBlitz that reproduces the issue:

StackBlitz: https://stackblitz.com/edit/ngx-bootstrap-ftrzc4?file=app%2Fapp.component.ts

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 2.0.2

Angular: 4.4.6

Bootstrap: 3.3.7

Build system: Angular Starter (Webpack and SystemJS)

comp(modal) needs review

Most helpful comment

This is still an issue with ngx-bootstrap v2.0.5 and v3.0.0

Setting the option animated: false helps but the race condition still exists.

All 3 comments

This is still an issue with ngx-bootstrap v2.0.5 and v3.0.0

Setting the option animated: false helps but the race condition still exists.

Any progress, in which version will be this fixed ?

Was this page helpful?
0 / 5 - 0 ratings