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

A cascaded BitDialog AutoFocusButton replaces the AutoFocusSelector a dialog sets itself

Aperta
#13,960 1 commento 0 reazioni 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@msynk ci sta già lavorando.

Dal 19/10/2026.

  • #13961 di @Mohammadzarei754 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Description

BitDialogParams.AutoFocusButton is the natural app-wide default for confirmations: the Boilerplate itself sets AutoFocusButton = BitDialogButton.Cancel in its new AppBitParams (#13849), so a stray Enter never carries out the destructive answer.

But AutoFocusButton takes precedence over AutoFocusSelector, and the cascade supplies it even to a dialog that set AutoFocusSelector itself. So once an app makes Cancel the default, every dialog that opens on a field (a reason to type, a date to pick) opens with the focus on Cancel instead, and the dialog's own choice is silently lost.

BitParams is documented as "a default and never an override", and the cascade already has the means for exactly this case (OutranksAttribute, as BitToggleButton.OnIcon outranks Icon), so this looks like a missing declaration rather than a design choice.

Steps to reproduce

<BitParams Parameters="[new BitDialogParams { AutoFocusButton = BitDialogButton.Cancel }]">
    <BitDialog IsOpen="true" Title="Why?" AutoFocusSelector="textarea">
        <BitTextField Multiline />
    </BitDialog>
</BitParams>

Expected

The dialog opens with the focus on its textarea, since it named that itself.

Actual

The focus lands on the Cancel button. The only workaround is writing AutoFocusButton="null" on every such dialog.

Found while porting #13849 into an app on 11.0.0-pre-10; the same code is on develop.

Lingua principale
C#
Stelle
1.4k
Fork
264
Merge medio
20h 36m
PR unite (30g)
322

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 bitfoundation/bitplatform

Tutte le issue di bitfoundation/bitplatform

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.