From 23de13bf1815ffc666157997ca3bff6930e1762c Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Mon, 25 Jan 2021 14:39:48 -0700 Subject: [PATCH] Force updating of URL bar when adding tabs. https://redmine.stoutner.com/issues/654 --- .../privacybrowser/activities/MainWebViewActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index c5b8b09f..971eaad1 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -4824,6 +4824,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook } private void addNewTab(String url, boolean moveToTab) { + // Clear the focus from the URL edit text, so that it will be populated with the information from the new tab. + urlEditText.clearFocus(); + // Get the new page number. The page numbers are 0 indexed, so the new page number will match the current count. int newTabNumber = tabLayout.getTabCount(); -- 2.45.2