From 3c8c822041da60ff979dcb85e73321dc97f9c2fb Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Tue, 15 Oct 2024 14:20:24 +0200 Subject: [PATCH] MOBILE-4616 send-message-form: Avoid call to CoreKeyboard.close() --- src/core/features/comments/pages/viewer/viewer.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/features/comments/pages/viewer/viewer.ts b/src/core/features/comments/pages/viewer/viewer.ts index 5879bbb9d22..dad4216ae1a 100644 --- a/src/core/features/comments/pages/viewer/viewer.ts +++ b/src/core/features/comments/pages/viewer/viewer.ts @@ -42,7 +42,6 @@ import { CoreNetwork } from '@services/network'; import moment from 'moment-timezone'; import { Subscription } from 'rxjs'; import { CoreAnimations } from '@components/animations'; -import { CoreKeyboard } from '@singletons/keyboard'; import { CoreToasts, ToastDuration } from '@services/toasts'; import { CoreLoadings } from '@services/loadings'; @@ -210,6 +209,10 @@ export class CoreCommentsViewerPage implements OnInit, OnDestroy { if (this.page == 0) { this.scrollToBottom(); } + + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } } } @@ -311,7 +314,6 @@ export class CoreCommentsViewerPage implements OnInit, OnDestroy { * @param text Comment text to add. */ async addComment(text: string): Promise { - CoreKeyboard.close(); const loadingModal = await CoreLoadings.show('core.sending', true); // Freeze the add comment button. this.sending = true;