akveo / akveo/nebular

Can not close NbDialog window on click outside of the modal window

Đang mở
#2,666 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
needs info
Ngôn ngữ chính
TypeScript
Star
8.1k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Issue type

**I'm submitting a ...**

* [x] bug report
* [ ] feature request

### Issue description

**Current behavior:**

I have a modal window and using NbDialog for this purpose.
And I noticed that if I have redirect to the several nested pages i,e /pages/page1/subPage2,
and open a modal window that can be opened globaly from the any page (it is in header of the site)., then
I can not close it on clicking outside of the window. I have to click 2 or 3 times in a row.

**Expected behavior:**

The window should be closed immediately after clickin outside the modal window.

**Steps to reproduce:**

**Related code:**

I use dialogService as in the example below:
```
this._dialogService.open(AboutComponent, {
context: {},
autoFocus: false,
});
```
In module.ts I have the following code:
```
const NB_MODULES = [
NbLayoutModule,
NbMenuModule,
NbUserModule,
NbActionsModule,
NbSearchModule,
NbSidebarModule,
NbContextMenuModule,
NbSecurityModule,
NbButtonModule,
NbSelectModule,
NbIconModule,
NbCardModule,
NbDialogModule.forRoot(),
NbPopoverModule,
NbInputModule,
NbCheckboxModule,
NbTooltipModule,
NbEvaIconsModule,
];

@NgModule({
imports: [SharedModule, CommonModule, ReactiveFormsModule, ...NB_MODULES],
exports: [CommonModule, ...PIPES, ...COMPONENTS],
declarations: [...COMPONENTS, ...PIPES, AboutComponent],
entryComponents: [AboutComponent]
})
export class ThemeModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: ThemeModule,
providers: [
...NbThemeModule.forRoot(
{
name: 'default',
},
[DEFAULT_THEME, COSMIC_THEME, CORPORATE_THEME, DARK_THEME],
).providers,
],
};
}
}

```

### Other information:

**npm, node, OS, Browser**
```

```

**Angular, Nebular**
```

Angular: 9.1.12
Nebular: 5.1.0
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.