-
Notifications
You must be signed in to change notification settings - Fork 332
fix(vue-renderless): [radio] fix handleKeydown blocking default events and bubble logic #1650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… events and bubble logicbug Fix blocking default events and bubble logic
WalkthroughThe recent changes in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/renderless/src/radio-group/index.ts (1 hunks)
Additional comments not posted (2)
packages/renderless/src/radio-group/index.ts (2)
29-30: The changes to callevent.stopPropagation()andevent.preventDefault()earlier in the function are appropriate for the intended fix. This should ensure that the event handling is more predictable and does not interfere with other elements.
29-30: Ensure that the changes inhandleKeydowndo not affect the behavior of themountedfunction, particularly in how focus and tabIndex are managed.Verification successful
The
mountedfunction sets up the initial state for radio buttons by ensuring that the first radio button has atabIndexof 0 if none of the radio buttons are checked. This function does not interact with thehandleKeydownfunction, which handles keydown events and stops propagation and prevents default behavior.
- The
mountedfunction remains unaffected by the changes inhandleKeydown.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `mounted` function's behavior remains consistent post changes. # Test: Search for any modifications or related issues in the `mounted` function. rg --type typescript $'mounted' packages/renderless/src/radio-group/index.tsLength of output: 110
Script:
#!/bin/bash # Description: Verify that the `mounted` function's behavior remains consistent post changes. # Test: Search for any modifications or related issues in the `mounted` function. rg --type ts $'mounted' packages/renderless/src/radio-group/index.tsLength of output: 155
Script:
#!/bin/bash # Description: Retrieve the full implementation of the `mounted` function to verify its behavior. # Test: Extract the full function definition for `mounted`. rg --type ts --context 10 $'export const mounted = (parent: IRadioGroupRenderlessParams[\'parent\']) => (): void => {' packages/renderless/src/radio-group/index.tsLength of output: 406
Script:
#!/bin/bash # Description: Retrieve the full implementation of the `mounted` function to verify its behavior. # Test: Extract the full function definition for `mounted`. rg --type ts --context 10 'export const mounted = ' packages/renderless/src/radio-group/index.tsLength of output: 660
|
你好,感谢您的PR,请问这个PR是解决哪个issue单的问题呢?有没有issue单的链接呢? |
Hello, thank you for your PR. Which issue does this PR solve? Is there a link to the issue sheet? |
你好,没有相关的 issue,这个问题是我在看源码的过程中发现的,对比上下文发现应该是个笔误。 |
Hello, there is no related issue. I discovered this problem while reading the source code. After comparing the context, I found that it should be a clerical error. |
|
@all-contributors please add @Nowitzki41 for code. |
|
I've put up a pull request to add @Nowitzki41! 🎉 |
… events and bubble logicbug
Fix blocking default events and bubble logic
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit