MOBILE-3814 rte: Fix hover style on rte item
parent
9bcbdfd3c6
commit
d727c53621
|
@ -20,7 +20,6 @@ import {
|
||||||
ViewChild,
|
ViewChild,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
OnInit,
|
OnInit,
|
||||||
AfterContentInit,
|
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
Optional,
|
Optional,
|
||||||
AfterViewInit,
|
AfterViewInit,
|
||||||
|
@ -56,7 +55,7 @@ import { CoreCancellablePromise } from '@classes/cancellable-promise';
|
||||||
templateUrl: 'core-editor-rich-text-editor.html',
|
templateUrl: 'core-editor-rich-text-editor.html',
|
||||||
styleUrls: ['rich-text-editor.scss'],
|
styleUrls: ['rich-text-editor.scss'],
|
||||||
})
|
})
|
||||||
export class CoreEditorRichTextEditorComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
|
export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
// Based on: https://github.com/judgewest2000/Ionic3RichText/
|
// Based on: https://github.com/judgewest2000/Ionic3RichText/
|
||||||
// @todo: Anchor button, fullscreen...
|
// @todo: Anchor button, fullscreen...
|
||||||
|
@ -149,7 +148,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterContentIn
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component being initialized.
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.canScanQR = CoreUtils.canScanQR();
|
this.canScanQR = CoreUtils.canScanQR();
|
||||||
|
@ -159,9 +158,9 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterContentIn
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init editor.
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
async ngAfterContentInit(): Promise<void> {
|
async ngAfterViewInit(): Promise<void> {
|
||||||
this.rteEnabled = await CoreDomUtils.isRichTextEditorEnabled();
|
this.rteEnabled = await CoreDomUtils.isRichTextEditorEnabled();
|
||||||
|
|
||||||
await this.waitLoadingsDone();
|
await this.waitLoadingsDone();
|
||||||
|
@ -202,13 +201,14 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterContentIn
|
||||||
|
|
||||||
this.deleteDraftOnSubmitOrCancel();
|
this.deleteDraftOnSubmitOrCancel();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
const ionItem = this.element.closest<HTMLIonItemElement>('ion-item');
|
||||||
* @inheritdoc
|
if (!ionItem) {
|
||||||
*/
|
return;
|
||||||
async ngAfterViewInit(): Promise<void> {
|
}
|
||||||
const label = this.element.closest('ion-item')?.querySelector('ion-label');
|
ionItem.classList.add('item-rte');
|
||||||
|
|
||||||
|
const label = ionItem.querySelector('ion-label');
|
||||||
|
|
||||||
if (!label) {
|
if (!label) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ ion-datetime.datetime-disabled {
|
||||||
|
|
||||||
// Make links clickable when inside radio or checkbox items. Style part.
|
// Make links clickable when inside radio or checkbox items. Style part.
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
ion-item.item-multiple-inputs:hover::part(native) {
|
ion-item.item-multiple-inputs:not(.item-rte):hover::part(native) {
|
||||||
color: var(--color-hover);
|
color: var(--color-hover);
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
|
@ -1276,7 +1276,7 @@ ion-datetime.datetime-disabled {
|
||||||
|
|
||||||
// It fixes the click on links where ion-ripple-effect is present.
|
// It fixes the click on links where ion-ripple-effect is present.
|
||||||
// Make links clickable when inside radio or checkbox items. Pointer and cursor part.
|
// Make links clickable when inside radio or checkbox items. Pointer and cursor part.
|
||||||
ion-item.item-multiple-inputs:not(.only-links),
|
ion-item.item-multiple-inputs:not(.only-links):not(.item-rte),
|
||||||
ion-item.ion-activatable:not(.only-links) {
|
ion-item.ion-activatable:not(.only-links) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
ion-label {
|
ion-label {
|
||||||
|
|
Loading…
Reference in New Issue