Skip to content

Commit

Permalink
bugfix: dialog will be shown on top (#290)
Browse files Browse the repository at this point in the history
* bugfix: dialog will be shown on top

* bugfix: dialog will be shown on top

* fix tests (issue #275)

Co-authored-by: Maxime Lafarie <5319267+maximelafarie@users.noreply.github.com>
  • Loading branch information
be-ndee and maximelafarie authored Oct 14, 2021
1 parent d92cd42 commit cc87c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ngx-smart-modal/src/services/ngx-smart-modal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ export class NgxSmartModalService {
}) as EventListener);

window.addEventListener(NgxSmartModalConfig.prefixEvent + 'open', ((e: CustomEvent) => {
this._openModal(e.detail.instance.modal, e.detail.top);
this._openModal(e.detail.instance.modal, e.detail.extraData.top);
}) as EventListener);

window.addEventListener(NgxSmartModalConfig.prefixEvent + 'toggle', ((e: CustomEvent) => {
this._toggleModal(e.detail.instance.modal, e.detail.top);
this._toggleModal(e.detail.instance.modal, e.detail.extraData.top);
}) as EventListener);

window.addEventListener(NgxSmartModalConfig.prefixEvent + 'close', ((e: CustomEvent) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ describe('NgxSmartModalService', () => {
instance: {
modal: 'fake modal'
},
top: true
extraData: {
top: true
}
}
};

Expand Down

0 comments on commit cc87c69

Please sign in to comment.