How to clear CustomWebView history stack when switching URLs on a single ID?

I am building an app using CustomWebView extension and I’m having trouble managing the browser history stack.

My app has a Home screen layout with multiple Card Views (e.g., Syllabus, Notifications). When clicked, each card sets a webviewer layout to visible and loads a specific URL using ID 1.

The Problem: When switching between these sections, the history stack from the previous URL remains active.

  1. User clicks Syllabus - opens Syllabus URL.
  2. User presses Back - hides webviewer layout, returns to Home layout.
  3. User clicks Notifications - opens Notifications URL.
  4. User presses Back - instead of returning to the Home layout, the webview navigates backward to the Syllabus page because it’s still in the history stack of id 1.

I have attached Current Blocks. Any guidance / block examples would be greatly appreciated. Thank you!



2 posts were merged into an existing topic: CustomWebView : An extended form of Web Viewer

5 posts were merged into an existing topic: CustomWebView : An extended form of Web Viewer