diff --git a/android/java/org/chromium/chrome/browser/brave_news/BraveNewsBottomSheetDialogFragment.java b/android/java/org/chromium/chrome/browser/brave_news/BraveNewsBottomSheetDialogFragment.java index f157224c86a1..37932ac573e7 100644 --- a/android/java/org/chromium/chrome/browser/brave_news/BraveNewsBottomSheetDialogFragment.java +++ b/android/java/org/chromium/chrome/browser/brave_news/BraveNewsBottomSheetDialogFragment.java @@ -91,7 +91,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat newTab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - TabUtils.openUrlInNewTab(false, mUrl); + TabUtils.openUrlInNewTabInBackground(false, mUrl); dismiss(); } }); diff --git a/android/java/org/chromium/chrome/browser/util/TabUtils.java b/android/java/org/chromium/chrome/browser/util/TabUtils.java index 6ea2637f8436..18e8eb94cb68 100644 --- a/android/java/org/chromium/chrome/browser/util/TabUtils.java +++ b/android/java/org/chromium/chrome/browser/util/TabUtils.java @@ -181,6 +181,16 @@ public static void openUrlInNewTab(boolean isIncognito, String url) { } } + public static void openUrlInNewTabInBackground(boolean isIncognito, String url) { + BraveActivity braveActivity = BraveActivity.getBraveActivity(); + if (braveActivity != null && braveActivity.getTabModelSelector() != null + && braveActivity.getActivityTab() != null) { + braveActivity.getTabModelSelector().openNewTab(new LoadUrlParams(url), + TabLaunchType.FROM_LONGPRESS_BACKGROUND_IN_GROUP, + braveActivity.getActivityTab(), isIncognito); + } + } + public static void openUrlInSameTab(String url) { BraveActivity braveActivity = BraveActivity.getBraveActivity(); if (braveActivity != null && braveActivity.getActivityTab() != null) {