Skip to content

Commit

Permalink
Trigger user gesture events on browser initiated navigations. (uplift…
Browse files Browse the repository at this point in the history
… to 1.50.x) (#17516)

Uplift of #17490 (squashed) to beta
  • Loading branch information
brave-builds authored Mar 14, 2023
1 parent 9eefc68 commit c046edd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion browser/brave_ads/ads_tab_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ void AdsTabHelper::DidFinishNavigation(
return;
}

if (navigation_handle->HasUserGesture()) {
// Some browser initiated navigations have HasUserGesture set to false. This
// should eventually be fixed in crbug.com/617904.
if (navigation_handle->HasUserGesture() ||
!navigation_handle->IsRendererInitiated()) {
const int32_t page_transition =
static_cast<int32_t>(navigation_handle->GetPageTransition());

Expand Down

0 comments on commit c046edd

Please sign in to comment.