Unwanted Focus Shift to First Tabstop on Checkbox Click
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Start in modules/alloy/src/main/ts/ephox/alloy/keying/TabbingTypes.ts, especially focusIn and the related findInitial call. Reproduce the behavior with the linked fiddle and compare it with related issue #5721. Done means clicking an interactive checkbox keeps focus on it and checks it, while the first tabstop is used only when no element is focused.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Component: Tabbing/keyboard navigation system (KeyingType with TabbingConfig)
Behavior: When clicking a checkbox at end of long panel with scroll, the focus first jumps to the first [data-alloy-tabstop="true"] (usualy text input) element before focusing the clicked element. And checkbox not checked.
Expected: Focus should remain on the clicked element if it’s interactive (e.g., checkbox). The first tabstop should only receive focus if no element is already focused.
Example: https://fiddle.tiny.cloud/LG7cNN2tsK/0
Root Cause:
The focusIn function forces focus on the first tabstop during initialization or focus events, overriding browser-native focus behavior.
Possible fix (I haven't checked if it works, otherwise I would have sent a PR right away):
const focusIn = (component: AlloyComponent, tabbingConfig: TabbingConfig, _tabbingState: Stateless): void => {
// If there is already active focus inside the component, we do nothing.
const hasActiveFocus = component.element.dom.contains(document.activeElement);
if (!hasActiveFocus) {
findInitial(component, tabbingConfig).each((target) => {
tabbingConfig.focusManager.set(component, target);
});
}
};
related to: #5721
- Lingua principale
- TypeScript
- Stelle
- 16.3k
- Fork
- 2.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tinymce/tinymce
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Tutte le issue di tinymce/tinymce
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
chrisparsons83/flexspotff#215 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
vitest-dev/vitest#11633 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno