From df6f4cf9d27baf99dde0acb2b976e78421807972 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 31 May 2019 07:43:04 +0200 Subject: [PATCH] grab focus on resume Signed-off-by: tobiasKaminsky --- .../android/ui/activity/RichDocumentsWebView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/owncloud/android/ui/activity/RichDocumentsWebView.java b/src/main/java/com/owncloud/android/ui/activity/RichDocumentsWebView.java index 24abbc99f1..5d1c2b1335 100644 --- a/src/main/java/com/owncloud/android/ui/activity/RichDocumentsWebView.java +++ b/src/main/java/com/owncloud/android/ui/activity/RichDocumentsWebView.java @@ -348,6 +348,14 @@ public class RichDocumentsWebView extends ExternalSiteWebView { } } + @Override + protected void onResume() { + super.onResume(); + + webview.evaluateJavascript("if (typeof OCA.RichDocuments.documentsMain.postGrabFocus !== 'undefined') " + + "{ OCA.RichDocuments.documentsMain.postGrabFocus(); }", null); + } + private class RichDocumentsMobileInterface { @JavascriptInterface public void close() {