Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature request: support Capacitor navigation for mobile apps

Closed
#480 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #485 by @rdlabo — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start by locating the Pages navigation engine and its URL scheme guard, then read the same-app URL comparison and related tests. Add coverage for capacitor://localhost navigation and for a different Capacitor host; verify HTTP(S) behavior is unchanged and other schemes remain rejected.

Written by the indexing model from the issue text.

Description

Problem

Void Pages rejects capacitor:// URLs, which Capacitor uses by default for local pages in its iOS WKWebView. Initial rendering and hydration work, but submitting a Pages action fails with:

Void Router: refusing to navigate to a capacitor: URL.

Observed with Void / @void/react 1.1.11 on an iOS 26.1 simulator. The same protocol guard is present on main (9ed64ba).

Reproduction

  1. Serve a Void React Pages application in a Capacitor iOS WebView at capacitor://localhost, with page requests forwarded to its Worker.
  2. Hydrate the page and submit a Pages form action, or invoke router.visit('/users', { method: 'POST' }).
  3. The navigation engine rejects the URL before sending the page request.

Expected: same-app Pages GET/POST navigation works under the default capacitor:// scheme.

Changing server.iosScheme to HTTP(S) is not a workaround: WKWebView already handles those schemes and Capacitor cannot register them. See Capacitor's configuration reference.

Proposed scope

Allow capacitor: alongside HTTP(S) in the Pages navigation engine. It also needs a small same-app URL comparison adjustment: new URL('capacitor://localhost/users').origin is "null", so comparing that value directly with WKWebView's window.location.origin does not identify the local app. Compare protocol and host for capacitor: only, preserving HTTP(S) behavior and rejecting other schemes.

No Capacitor dependency or configurable scheme registry is needed. Different Capacitor hosts must not be treated as the same origin.

Dominant language
TypeScript
Stars
402
Forks
32
Avg merge
10h 51m
Merged PRs (30d)
100

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voidzero-dev/void

All issues in voidzero-dev/void

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.