mirror of
https://github.com/cylonid/NativeAlphaForAndroid.git
synced 2026-11-05 00:47:30 +00:00
[PR #98] fix: open links with target=_blank in CustomTabs, same behavior as chrome PWAs #222
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cylonid/NativeAlphaForAndroid#222
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cylonid/NativeAlphaForAndroid/pull/98
Author: @chaserhkj
Created: 1/19/2023
Status: 🔄 Open
Base:
dev← Head:custom-tab-fix📝 Commits (1)
ad54a7bFix target=_blank behavior📊 Changes
2 files changed (+24 additions, -0 deletions)
View changed files
📝
app/build.gradle(+1 -0)📝
app/src/main/java/com/cylonid/nativealpha/WebViewActivity.java(+23 -0)📄 Description
In a chrome-created PWA on Android, if the user clicks a link with
target=_blank(requesting link to be opened in a new tab), the link will be opened in a newly-popped-up browser activity (CustomTabs) , instead of navigating the main app page to the link or opening it in system browser.This behavior is particularly important for SPAs like a music player, where the user could be listening to some music and browsing around, and opening links in new tab as requested can have the music playback uninterrupted.
However in current Native Alpha behavior such a click would make the main app page to navigate to the link and interrupt the playing music in main app page. This PR fixes this and make Native Alpha behave the same as chrome PWAs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.