From c0c5a932430e16f193365d4a4e877c555f8100a3 Mon Sep 17 00:00:00 2001 From: Marko Savic Date: Mon, 12 Oct 2020 14:10:32 -0400 Subject: [PATCH] Fix UBE issue: cannot view or interact with the classic block on Jetpack sites (#26006) --- .../ReactNativeGutenbergBridge/GutenbergWebViewActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native-bridge/android/src/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergWebViewActivity.java b/packages/react-native-bridge/android/src/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergWebViewActivity.java index f9667dc54fa333..f8e00e60211b06 100644 --- a/packages/react-native-bridge/android/src/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergWebViewActivity.java +++ b/packages/react-native-bridge/android/src/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergWebViewActivity.java @@ -226,12 +226,13 @@ private void evaluateJavaScript(String script) { private void onGutenbergReady() { preventAutoSavesScript(); - insertBlockScript(); final Handler handler = new Handler(); handler.postDelayed(() -> { // We want to make sure that page is loaded // with all elements before executing external JS injectOnGutenbergReadyExternalSources(); + // Inject block content + insertBlockScript(); // We need some extra time to hide all unwanted html elements // like NUX (new user experience) modal is. mForegroundView.postDelayed(() -> mForegroundView.setVisibility(View.INVISIBLE), 1500);