Skip to content
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

Disabled a-radio Component Still Clickable #4997

Closed
1 task done
aistfan98 opened this issue Dec 7, 2021 · 2 comments
Closed
1 task done

Disabled a-radio Component Still Clickable #4997

aistfan98 opened this issue Dec 7, 2021 · 2 comments

Comments

@aistfan98
Copy link

aistfan98 commented Dec 7, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0

Environment

macOS Mojave Version 10.14.16, Google Chrome Version 93.0.4577.82 (Official Build) (x86_64), Vue Version ^3.0.5

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Follow the provided Code Sandbox link. When arriving at the page, you might get an error in the browser saying something along the lines of "You cannot use import statements outside of a module." Simply refresh the browser page, and this error should be gone. For some reason Code Sandbox does not always transpile all modules on load.

Anyway, once you have the working app, simply attempt clicking the disabled radio button. You will see that the associated on click handler runs, which is unexpected. In addition, at various points around the button itself, the user's cursor will shift from the 'not-allowed' state to 'pointer', which is also unexpected. I will include a screenshot of this pointer cursor on this issue.

Screen Shot 2021-12-07 at 2 10 39 PM

What is expected?

Disabled radio buttons should not be clickable, just like regular disabled buttons. The cursor should always be in a "not-allowed" state when hovering over the disabled a-radio component, and the associated onClick handler should not run on click.

What is actually happening?

Not only does the onClick hander run when the disabled a-radio component is clicked, but the cursor also transitions to a "cursor" state at certain points around the button

@tangjinzhou
Copy link
Member

1、we will fix cursor issue at 3.0. you can custom css to fix it at 2.x, like .ant-radio-wrapper-disabled { cursor: 'not-allowed'}
2、we not disabled click event, you should use @update:checked or @change or v-model:checked
3、you can not set type="primary", this is invalid type for input.
4、recomend to upgrade to vue@3.2 and antdv@2.2 or 3.0

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants