Skip to content

WebPayments - Prevent iframe navigation in WebView#44

Open
adelinmihoc wants to merge 1 commit intoPayU-EMEA:mainfrom
adelinmihoc:web-frame-nav
Open

WebPayments - Prevent iframe navigation in WebView#44
adelinmihoc wants to merge 1 commit intoPayU-EMEA:mainfrom
adelinmihoc:web-frame-nav

Conversation

@adelinmihoc
Copy link

Filter onNavigationRequest to handle only main-frame navigations. This prevents iframe (subframe) URLs from triggering app navigation logic and causing unintended side effects.

Problem described in support request at techsupport@payu.ro registration number: 35088216.

onNavigationRequest: (request) {
// Prevent navigation to other frames (e.g. iframes)
if (!request.isMainFrame) {
return NavigationDecision.prevent;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Subframe/iframe navigations are currently prevented; allowing them via NavigationDecision.navigate is a viable alternative if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants