Add Android popup support; add popupNavigate event for both platforms#29
Open
modos189 wants to merge 1 commit into
Open
Add Android popup support; add popupNavigate event for both platforms#29modos189 wants to merge 1 commit into
popupNavigate event for both platforms#29modos189 wants to merge 1 commit into
Conversation
02f004a to
ec6b738
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android
Introduces
PopupWebChromeClient- a delegating wrapper around the existingWebChromeClientthat interceptsonCreateWindowand presents the popup in a bottom-sheet-styleDialog.BottomSheetDialog(Material Components) was intentionally avoided to preserve the project's stated Android 19+ support; swipe-to-dismiss is implemented manually usingVelocityTrackerand touch event interception on both the toolbar and the WebView content area (when scrolled to top). The popup WebView inherits the parent's user-agent string.target="_blank"links opened from inside an already-open popup are forwarded to the system browser rather than nesting another sheet.A new optional
createWebChromeClientfactory is added alongside the existingcreateWebViewClient, using the same(webview, clientClass) => Clientpattern.iOS
A
WKNavigationDelegateis attached to the popupWKWebViewso that navigation events are now surfaced through the sharedpopupNavigateevent, consistent with Android.New API
supportPopupstrue.popupNavigateeventargs.cancel = trueto close it and handle the URL in app code.createWebChromeClientWebChromeClient, same pattern ascreateWebViewClient.