From: Soren Stoutner Date: Mon, 25 Jan 2021 21:39:48 +0000 (-0700) Subject: Force updating of URL bar when adding tabs. https://redmine.stoutner.com/issues/654 X-Git-Tag: v3.7~11 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=23de13bf1815ffc666157997ca3bff6930e1762c;p=PrivacyBrowserAndroid.git Force updating of URL bar when adding tabs. https://redmine.stoutner.com/issues/654 --- 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();