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
[Style] [button, button-group] elementui中el-button点击后按钮颜色不变 #12221
Comments
html <button /> onmousedown的默认策略鼠标按下后处于 focus 状态,也就是看上去没有恢复成原来的颜色(此时是focus样式被激活)。 修改这个问题非常简单,不过不应该破坏w3标准的默认策略,因为网页访问者有正常人、残障人、机器人等,可能会破坏其他使用者的操作。 我提供下面两种方案,快速解决你的问题
希望对你有帮助 |
认同楼上大佬所说的,再补充一个场景:用户点击弹窗且操作完毕后,可以快速恢复到之前的浏览上下文。 而且这个issue在 #8930 有讨论,详细可以点进去看看。 |
element-plus 维护者们对待 w3 标准我个人是非常认同的,比如
不过我个人认为 focus 状态 效果 的确存在缺陷,focus 状态应该是基于active状态下更突出视觉效果(类似bootstrap5的效果),达到视觉与操作连贯性。 当前效果会给最终网页预览者造成困惑和误解
@MrWeilian 建议对 focus 状态的颜色、边框上做一些视觉优化。 |
感谢大佬的指点 |
大佬,怎么处理的 |
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. 此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。 |
Bug Type:
Style
Environment
3.2.47
2.3.1
Chrome
Vite
Reproduction
Related Component
el-button
el-button-group
Reproduction Link
Element Plus Playground
Steps to reproduce
点击【确认】按钮,鼠标离开不会恢复原来的颜色。
What is Expected?
鼠标悬停【确认】按钮才会触发按钮背景色,鼠标离开就没有背景色
What is actually happening?
点击【确认】按钮会触发按钮背景色,鼠标离开按钮没有恢复原来的颜色
Additional comments
讲真的,饿了么团队的大佬们,你们难道没注意到这个问题吗?官网button按钮的示例都是点击以后不会恢复原来的颜色,正常情况不应该是鼠标悬浮在按钮上的时候显示颜色,鼠标离开按钮就恢复原来的颜色吗?现在这种设计也太不人性化了吧,希望能修复。
The text was updated successfully, but these errors were encountered: