From 834272ac6406a482efef3acd5453f2cf8cc00dc0 Mon Sep 17 00:00:00 2001 From: Dereck Lynch Date: Thu, 22 Aug 2019 12:16:44 -0400 Subject: [PATCH] fix(toast-panel): label select in toast-panel content is now working --- .../toast-panel/toast-panel.component.html | 119 +++++++++--------- .../toast-panel/toast-panel.component.scss | 4 + .../toast-panel/toast-panel.component.ts | 11 +- 3 files changed, 77 insertions(+), 57 deletions(-) diff --git a/src/app/pages/portal/toast-panel/toast-panel.component.html b/src/app/pages/portal/toast-panel/toast-panel.component.html index f8ca96726..de2844ed3 100644 --- a/src/app/pages/portal/toast-panel/toast-panel.component.html +++ b/src/app/pages/portal/toast-panel/toast-panel.component.html @@ -1,64 +1,71 @@ - + + - + + + - + - + - +
-
+ + - - + + + +
+ + - - +
-
- + +
diff --git a/src/app/pages/portal/toast-panel/toast-panel.component.scss b/src/app/pages/portal/toast-panel/toast-panel.component.scss index 6d97d58aa..5c616b1ba 100644 --- a/src/app/pages/portal/toast-panel/toast-panel.component.scss +++ b/src/app/pages/portal/toast-panel/toast-panel.component.scss @@ -50,4 +50,8 @@ igo-panel ::ng-deep .igo-panel-header ::ng-deep [panelrightbutton] { igo-panel ::ng-deep .igo-panel-content { max-height: 230px; + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + -ms-user-select: auto !important; + user-select: auto !important; } diff --git a/src/app/pages/portal/toast-panel/toast-panel.component.ts b/src/app/pages/portal/toast-panel/toast-panel.component.ts index 1a62a89ce..a931fd298 100644 --- a/src/app/pages/portal/toast-panel/toast-panel.component.ts +++ b/src/app/pages/portal/toast-panel/toast-panel.component.ts @@ -11,6 +11,7 @@ import { BehaviorSubject } from 'rxjs'; import { getEntityTitle, EntityStore } from '@igo2/common'; import { Feature, SearchResult } from '@igo2/geo'; +import { Media, MediaService } from '@igo2/core'; @Component({ selector: 'app-toast-panel', @@ -60,7 +61,9 @@ export class ToastPanelComponent { return this.store.all(); } - constructor() {} + constructor( + public mediaService: MediaService + ) {} getTitle(result: SearchResult) { return getEntityTitle(result); @@ -93,6 +96,12 @@ export class ToastPanelComponent { this.unselectResult(); } + isMobile(): boolean { + return ( + this.mediaService.getMedia() === Media.Mobile + ); + } + @HostListener('document:keydown.ArrowLeft') previousResult() { if (!this.resultSelected$.value) {