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

web: an Apple Pencil counts as touch; treat a stylus as a pen

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, zig
Ambito
frontend

Direzione di ricerca

Read web.js and the pointer handling introduced or discussed in #563, then trace how web touch input becomes dvui buttons. Compare the TouchEvent path with the suggested Pointer Events path and check how pen, touch and mouse input are represented. Done means an Apple Pencil is treated as pen input on web, with hover after lifting and mouse-style canvas panning; the issue notes this also requires a dvui-dev commit and repin.

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

Descrizione

enhancement

Follow-up from #563, the pointer seam (dvui.pointerKind()).

On the native backend, SDL's pen and mouse touch ids are excluded, so a pen reads as .mouse. On the web, web.js turns every TouchEvent into a dvui touch button. An Apple Pencil on iPad Safari sends TouchEvents with touch.touchType === "stylus", so a pencil counts as .touch there. That's consistent, not flipping, but pixi users drawing with a pencil on the web get touch behaviour: no hover after a lift, and touch-style panning in canvases.

Fix in web.js (dvui's web glue, pinned from dvui-dev):

  • Route touchType === "stylus" touches as mouse/pen input rather than touch buttons.
  • Or move to Pointer Events and use pointerType ("pen" / "touch" / "mouse"), which also covers Android styluses.

That would make a separate PR, with a dvui-dev commit and a repin.

Lingua principale
Zig
Stelle
1.5k
Fork
40
Merge medio
4h 39m
PR unite (30g)
428

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 fizzyedit/fizzy

Tutte le issue di fizzyedit/fizzy

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.