From 76c5998ae8132a44ec6aa03c5a47cbcbb34bc304 Mon Sep 17 00:00:00 2001 From: saransh kataria Date: Tue, 30 Jan 2018 22:27:29 +0530 Subject: [PATCH] Focus modal instead of parent dialog (#1392) --- src/modules/modal/modal-component-adapter.service.ts | 2 +- src/modules/modal/modal.component.html | 2 +- src/modules/modal/modal.component.scss | 6 +++++- src/modules/modal/modal.component.spec.ts | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/modal/modal-component-adapter.service.ts b/src/modules/modal/modal-component-adapter.service.ts index 49dd4db74..b85966e30 100644 --- a/src/modules/modal/modal-component-adapter.service.ts +++ b/src/modules/modal/modal-component-adapter.service.ts @@ -96,7 +96,7 @@ export class SkyModalComponentAdapterService { if (inputWithAutofocus) { inputWithAutofocus.focus(); } else { - let focusEl: HTMLElement = modalEl.nativeElement.querySelector('.sky-modal-dialog'); + let focusEl: HTMLElement = modalEl.nativeElement.querySelector('.sky-modal'); focusEl.focus(); } diff --git a/src/modules/modal/modal.component.html b/src/modules/modal/modal.component.html index 183f6e4f6..d3ba72220 100644 --- a/src/modules/modal/modal.component.html +++ b/src/modules/modal/modal.component.html @@ -7,12 +7,12 @@