MOBILE-3063 reading: Avoid collapsible heading glitch
parent
070fbc5cd1
commit
553664ce68
|
@ -132,9 +132,9 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy {
|
||||||
*/
|
*/
|
||||||
protected async enterReadingMode(): Promise<void> {
|
protected async enterReadingMode(): Promise<void> {
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
CoreViewer.loadReadingModeSettings();
|
await CoreViewer.loadReadingModeSettings();
|
||||||
|
|
||||||
this.header?.setEnabled(false);
|
await this.header?.setEnabled(false);
|
||||||
|
|
||||||
document.body.classList.add('core-reading-mode-enabled');
|
document.body.classList.add('core-reading-mode-enabled');
|
||||||
|
|
||||||
|
@ -172,11 +172,11 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy {
|
||||||
* Disable the reading mode.
|
* Disable the reading mode.
|
||||||
*/
|
*/
|
||||||
protected async disableReadingMode(): Promise<void> {
|
protected async disableReadingMode(): Promise<void> {
|
||||||
|
await this.header?.setEnabled(true);
|
||||||
|
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
document.body.classList.remove('core-reading-mode-enabled');
|
document.body.classList.remove('core-reading-mode-enabled');
|
||||||
|
|
||||||
this.header?.setEnabled(true);
|
|
||||||
|
|
||||||
// Enable all styles in element.
|
// Enable all styles in element.
|
||||||
this.disabledStyles.forEach((style) => {
|
this.disabledStyles.forEach((style) => {
|
||||||
style.disabled = false;
|
style.disabled = false;
|
||||||
|
|
Loading…
Reference in New Issue