From e9e86050030f859f8f65ce57d2f1316e1fb0a04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 23 Jun 2020 11:39:15 +0200 Subject: [PATCH 1/3] MOBILE-3401 style: Some fix on darkmode --- src/addon/mod/quiz/components/index/index.scss | 6 ++++++ src/app/app.scss | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/addon/mod/quiz/components/index/index.scss b/src/addon/mod/quiz/components/index/index.scss index e359e8a0b..f6f7cb907 100644 --- a/src/addon/mod/quiz/components/index/index.scss +++ b/src/addon/mod/quiz/components/index/index.scss @@ -46,6 +46,12 @@ ion-app.app-root addon-mod-quiz-index { background-color: $blue-dark; color: $blue-light; } + + .item.addon-mod_quiz-highlighted.activated, + .item.addon-mod_quiz-highlighted.activated p { + background-color: $blue; + color: $blue-light; + } } } } diff --git a/src/app/app.scss b/src/app/app.scss index ff148ca9c..e23c90d0c 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -441,6 +441,18 @@ ion-app.app-root { } } } + @include darkmode() { + @each $color-name, $color-base, $color-contrast in get-colors($colors-dark) { + &.select-md-#{$color-name}, + &.select-ios-#{$color-name} { + color: $color-base; + + .select-icon .select-icon-inner { + color: $color-base; + } + } + } + } } .item-label-stacked ion-select[multiple="true"] { From 206afd7505f55d87d27b59c904cbe5d87e3f3fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 23 Jun 2020 13:03:40 +0200 Subject: [PATCH 2/3] MOBILE-3401 qrscanner: Fix scanner on darkmode --- src/app/app.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/app.scss b/src/app/app.scss index e23c90d0c..51e512502 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -1305,17 +1305,17 @@ ion-app.app-root { // QR scan. The scanner is at the background of the app, we need to hide the elements that overlay it. .core-scanning-qr { ion-app.app-root { - background-color: transparent; + background-color: transparent !important; .ion-page { - background-color: transparent; + background-color: transparent !important; } ion-content, ion-backdrop, ion-modal:not(.core-modal-fullscreen), core-ion-tabs { - display: none; + display: none !important; } &.ios .ion-page.show-page~.nav-decor { - display: none; + display: none !important; } } } From 8f21507b78413f1e817f0ca33112879580cda68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 23 Jun 2020 15:04:54 +0200 Subject: [PATCH 3/3] MOBILE-3401 search: Show/hide search history checking focus --- .../components/search-box/core-search-box.html | 2 +- .../search/components/search-box/search-box.scss | 7 ------- .../search/components/search-box/search-box.ts | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/core/search/components/search-box/core-search-box.html b/src/core/search/components/search-box/core-search-box.html index 58b13bb4c..1a14ad003 100644 --- a/src/core/search/components/search-box/core-search-box.html +++ b/src/core/search/components/search-box/core-search-box.html @@ -9,7 +9,7 @@ - + {{item.searchedtext}} diff --git a/src/core/search/components/search-box/search-box.scss b/src/core/search/components/search-box/search-box.scss index a800669ef..311e796fc 100644 --- a/src/core/search/components/search-box/search-box.scss +++ b/src/core/search/components/search-box/search-box.scss @@ -23,7 +23,6 @@ ion-app.app-root core-search-box { } .core-search-history { - display: none; max-height: calc(-120px + 80vh); overflow-y: auto; @@ -35,10 +34,4 @@ ion-app.app-root core-search-box { border-bottom: 0; } } - - form:focus-within { - .core-search-history { - display: block; - } - } } diff --git a/src/core/search/components/search-box/search-box.ts b/src/core/search/components/search-box/search-box.ts index 8a3116c14..7ec64c7d9 100644 --- a/src/core/search/components/search-box/search-box.ts +++ b/src/core/search/components/search-box/search-box.ts @@ -78,6 +78,19 @@ export class CoreSearchBoxComponent implements OnInit { if (this.searchArea) { this.loadHistory(); } + + this.formElement.nativeElement.addEventListener('focus', () => { + this.historyShown = true; + }, true); + + this.formElement.nativeElement.addEventListener('blur', () => { + // Wait the new element to be focused. + setTimeout(() => { + if (document.activeElement.closest('form') != this.formElement.nativeElement) { + this.historyShown = false; + } + }); + }, true); } /** @@ -100,6 +113,7 @@ export class CoreSearchBoxComponent implements OnInit { this.domUtils.triggerFormSubmittedEvent(this.formElement, false, this.sitesProvider.getCurrentSiteId()); + this.historyShown = false; this.searched = this.searchText; this.onSubmit.emit(this.searchText); }