Skip to content

Commit 45bcdf8

Browse files
authored
fix: Mitigate pending editor content loss (#22186)
* fix: Preserve GutenbergKit WebView state during config changes Follow Google recommendations to disable restarting an activity that house WebViews. Instead, handle the events in the activity itself. This helps ensure state like content and scroll position persist through these configuration changes. https://developer.android.com/develop/ui/compose/quick-guides/content/manage-webview-state * fix: Reinstate EditPostActivity's previous `configChanges` settings This was modified for GutenbergKit's WebView, but is no longer necessary now that GutenbergKit is managed by a separate GutenbergKitActivity. #21662
1 parent 1bb559a commit 45bcdf8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

WordPress/src/main/AndroidManifest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@
288288
<!-- Posts activities -->
289289
<activity
290290
android:name=".ui.posts.EditPostActivity"
291-
android:configChanges="screenLayout|orientation|screenSize
292-
|keyboard|keyboardHidden|smallestScreenSize"
291+
android:configChanges="locale|orientation|screenSize"
293292
android:theme="@style/WordPress.NoActionBar.NoEdgeToEdge"
294293
android:windowSoftInputMode="stateHidden|adjustResize"
295294
android:exported="false">
@@ -299,8 +298,7 @@
299298
</activity>
300299
<activity
301300
android:name=".ui.posts.GutenbergKitActivity"
302-
android:configChanges="screenLayout|orientation|screenSize
303-
|keyboard|keyboardHidden|smallestScreenSize"
301+
android:configChanges="locale|screenLayout|orientation|screenSize|keyboard|keyboardHidden|smallestScreenSize|uiMode"
304302
android:theme="@style/WordPress.NoActionBar.NoEdgeToEdge"
305303
android:windowSoftInputMode="stateHidden|adjustResize"
306304
android:exported="false">

0 commit comments

Comments
 (0)