Comments (4)
I don't think you should do this. Enter is typically used to submit forms implicitly. You may confuse users by having Enter behave as a Tab depending on the context, in a form or out of one.
That said, I think we have a bug, I cannot implicitly submit from a RadioGroup.
See native works: https://jsfiddle.net/xc1j9tg0/
I altered the codesandbox to something similar to this fiddle, the submit is not called. This is probably related to stopping the key from bubbling. I thought we had an issue already open for this, but I couldn't find it. So I'll leave this one for now.
from react-spectrum.
Could you use a capturing listener here instead?
from react-spectrum.
@LFDanLu Do you have any exemple I could try ?
from react-spectrum.
https://codesandbox.io/p/sandbox/unruffled-mestorf-dd8h7d?file=%2Fsrc%2FApp.js%3A12%2C10, could you use a capturing listener to detect Enter on a radio input element?
from react-spectrum.
Related Issues (20)
- usePopover: border-radius is not accounted for with Arrow Positioning HOT 4
- '"react-aria-components"' has no exported member named 'TextFieldProps'. HOT 3
- @react-aria/utils platform functions results are cached in test environment HOT 3
- Opening/closing Select causes layoutshift HOT 1
- [RAC] - "Select" cannot disable focus on ListBoxItem hover. HOT 6
- [RAC] - Ability to unselect a ListBoxItem in an uncontrolled Select HOT 2
- `NumberField` breaks when value is less than 3 for `locale="ar"` HOT 1
- Tooltip: crossOffset is not working HOT 4
- Table View: Text field inside a table view is not editable when clicked HOT 1
- Example for RAC Select with complex items is missing HOT 9
- Select and ComboBox submit value as react-aria-1, react-aria-2 etc. HOT 2
- Button implemented with useButton() can't be used to open a Menu HOT 3
- Link stuck in pressed state when opened with keyboard HOT 1
- [RAC] Tooltip on button in Table Cells break the hover state of actionable Row HOT 1
- Exception when nesting both <TabList> and <Menu> under <Tabs> HOT 3
- [RAC] Add layout="grid" to GridList HOT 2
- Allow passing data attributes to FieldError HOT 2
- allowTextSelectionOnPress isn't working for `usePress` HOT 1
- `data-hovered` props is being eaten HOT 3
- Table dynamic collections, useAsyncList, and useMemo/useCallback/etc can easily interact to create memory leaks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-spectrum.