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

[Bug Report] Radio's checked state not reset when go back from history #21247

Closed
wrma opened this issue Aug 20, 2021 · 2 comments · Fixed by #21250
Closed

[Bug Report] Radio's checked state not reset when go back from history #21247

wrma opened this issue Aug 20, 2021 · 2 comments · Fixed by #21250
Assignees

Comments

@wrma
Copy link

wrma commented Aug 20, 2021

Element UI version

2.15.5

OS/Browsers version

Chrome 92.0.4515.159(x86_64)

Vue version

2.6.14

Reproduction Link

https://codepen.io/wrma/pen/gOWVvgQ

Steps to reproduce

  1. Select any radio-button except the first one
  2. Click link
  3. Click browser’s back button

What is Expected?

Radio's checked state reset to the first one

What is actually happening?

Radio's checked state not reset

@wrma
Copy link
Author

wrma commented Aug 20, 2021

I find radio-button's active style is depend on the checked state like this:
image

but browser will cache the 'checked' status, this solution add autocomplete="off" on the input
https://stackoverflow.com/questions/37933043/reset-checkbox-checked-state-go-back-from-history

or can active style becomes data driven instead of relying on the native checked status?

@lemon-tree-sheng
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants