akveo / akveo/nebular

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

Abierto
#2,666 1 comentario 0 reacciones 0 asignados Ver en GitHub
needs info
Lenguaje dominante
TypeScript
Estrellas
8.1k
Forks
1.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.