Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature request: support Capacitor navigation for mobile apps

Chiusa
#480 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #485 di @rdlabo — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
402
Fork
32
Merge medio
10h 51m
PR unite (30g)
100

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/void

Tutte le issue di voidzero-dev/void

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.