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

Select and TreeSelect cannot be selected when use custom prefixCls #5023

Closed
1 task
wishong opened this issue Dec 13, 2021 · 35 comments
Closed
1 task

Select and TreeSelect cannot be selected when use custom prefixCls #5023

wishong opened this issue Dec 13, 2021 · 35 comments

Comments

@wishong
Copy link

wishong commented Dec 13, 2021

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

Version

3.0.0-alpha.15

Environment

3.0.0-alpha.15

Reproduction link

https://github.com/vueComponent/ant-design-vue

Steps to reproduce

使用Select和TreeSelect

What is expected?

无法选择

What is actually happening?

版本回退到3.0.0-alpha.14正常
14

3.0.0-alpha.15选不了
15

@github-actions github-actions bot changed the title Select和TreeSelect无法选择 Select and TreeSelect cannot be selected Dec 13, 2021
@tangjinzhou
Copy link
Member

官网示例没问题啊 给个复现吧

@wishong
Copy link
Author

wishong commented Dec 13, 2021

官网示例没问题啊 给个复现吧

可以看下这个demo
https://github.com/wishong/antd-bug

@tangjinzhou
Copy link
Member

自己跑一下了吗 我这没问题

@wishong
Copy link
Author

wishong commented Dec 13, 2021

自己跑一下了吗 我这没问题

我和同事的电脑都不行 您可以用别人电脑试一下

@wsxe9988
Copy link

自己跑一下了吗 我这没问题

我和同事的电脑都不行 您可以用别人电脑试一下

你可以提供下出现问题的电脑的操作系统,浏览器类型及版本 供排查问题。

@wishong
Copy link
Author

wishong commented Dec 13, 2021

你可以提供下出现问题的电脑的操作系统,浏览器类型及版本 供排查问题。

win10家庭版 chrome 96.0.4664.45

@tangjinzhou
Copy link
Member

试着 删除 nodemodules .lock 文件重装试试吧
我没能复现

@yandixuan
Copy link

@tangjinzhou 我也是的build完后 nginx跑 .15版本根本不能选 .14版本select 第一次打开就这个问题再打开就好了。本地复现不出来这个问题

@yandixuan
Copy link

debug了下第一次open下拉框时渲染的dom,ant-select-dropdown的style属性有个 pointer-events:none; 关闭之后第二次打开这个属性就没了(.14版本) @tangjinzhou

@tangjinzhou
Copy link
Member

如果是 build 之后才会有问题,那提交一个包含 build 之后代码的仓库

@tangjinzhou
Copy link
Member

你们自定义了动画 ?

@yandixuan
Copy link

https://github.com/yandixuan/build-error
@tangjinzhou 已经包含build 直接点进去第一个页面的select都无法选择

@tangjinzhou
Copy link
Member

https://github.com/yandixuan/build-error @tangjinzhou 已经包含build 直接点进去第一个页面的select都无法选择

你这是用 yarn build:test 构建的吧,组件内部对 test 模式做了特殊处理 😓

@tangjinzhou
Copy link
Member

tangjinzhou commented Dec 17, 2021

不知道你们是不是同一个原因 @yandixuan @wishong

tangjinzhou added a commit that referenced this issue Dec 17, 2021
@yandixuan
Copy link

🤣 那我换个mode , thanks for youur reply @tangjinzhou

@wishong
Copy link
Author

wishong commented Dec 17, 2021

不知道你们是不是同一个原因 @yandixuan @wishong

我是开发环境就不行了

tangjinzhou added a commit that referenced this issue Dec 17, 2021
@tangjinzhou
Copy link
Member

是否在 less 自定义了 prefixCls @wishong

@wishong
Copy link
Author

wishong commented Dec 17, 2021

是否在 less 自定义了 prefixCls @wishong

是的,定义了。也有可能是这个问题。因为prefixCls也提了好几个issues了

@tangjinzhou
Copy link
Member

你给的复现示例并没有反映出这个 配置,方便的话在核实下 https://github.com/wishong/antd-bug 这个仓库能复现选不中问题 ?

@wishong
Copy link
Author

wishong commented Dec 17, 2021

你给的复现示例并没有反映出这个 配置,方便的话在核实下 https://github.com/wishong/antd-bug 这个仓库能复现选不中问题 ?

我的demo中是有修改前缀类名的。
刚才又试了一下,真的是prefixCls导致的。删除之后选择都正常了。您可以看一下是否是这个影响到了

@tangjinzhou tangjinzhou changed the title Select and TreeSelect cannot be selected Select and TreeSelect cannot be selected when use custom prefixCls Dec 17, 2021
@transtone
Copy link

debug了下第一次open下拉框时渲染的dom,ant-select-dropdown的style属性有个 pointer-events:none; 关闭之后第二次打开这个属性就没了(.14版本) @tangjinzhou

不仅是ant-select-dropdwon有这个问题,下拉选择都有这个问题。ant-dropdown 也一样会多一个 pointer-events: none; 的样式,导致鼠标移不进去。

@IvanRoslov
Copy link

It's very sad that you don't use English. Using the library becomes very difficult. Thanks to Google translator, I realized that I have the same problem, but I didn't understand whether it was a bug or a problem in my implementation.

P.S. If you add a rule to write an issue and discuss in English, it will greatly help developers from other countries. Thank you for your work.

@IvanRoslov
Copy link

IvanRoslov commented Jan 9, 2022

The problem is in pointer-events: none, I agree with that. All my selects and dropdowns broke down. Rolled back to 3.0.0-alpha.14 everything works well in this version.

I don't use custom prefixCls;

@tangjinzhou
Copy link
Member

@IvanRoslov update to 3.0.0-beta.7

@IvanRoslov
Copy link

IvanRoslov commented Jan 10, 2022

@tangjinzhou Unfortunately, it didn't help. Beta 7 also has this bug.

@transtone
Copy link

transtone commented Jan 12, 2022

@IvanRoslov update to 3.0.0-beta.7

无效。
image

@transtone
Copy link

It's very sad that you don't use English. Using the library becomes very difficult. Thanks to Google translator, I realized that I have the same problem, but I didn't understand whether it was a bug or a problem in my implementation.

P.S. If you add a rule to write an issue and discuss in English, it will greatly help developers from other countries. Thank you for your work.

也许英语会帮到一些外国人,但就帮不到更多的使用中文的人了。有谷歌翻译不是一样的吗。

@tangjinzhou
Copy link
Member

Can someone give me an example by codesandbox to reproduce this issue.

@tangjinzhou tangjinzhou reopened this Jan 12, 2022
@tangjinzhou
Copy link
Member

tangjinzhou commented Jan 12, 2022

And you should not use NODE_ENV= test env to deploy or dev site.
Maybe is other reason,but you should give me a reproduce demo for debugger it.
@transtone @IvanRoslov

@IvanRoslov
Copy link

IvanRoslov commented Jan 14, 2022

@tangjinzhou

Example https://stackblitz.com/edit/vitejs-vite-ubopey?file=src/App.vue&terminal=dev

@transtone
Copy link

transtone commented Feb 1, 2022

still not fix with 3.0.0-beta.9

this css may help:

.ant-popover,
.ant-select-dropdown,
.ant-dropdown {
  pointer-events: initial !important;
}

@snecker
Copy link

snecker commented Feb 12, 2022

have the same problem
version is 3.0.0-beta.9

@transtone
Copy link

@tangjinzhou 3.1.0-rc5 still not fix this problem.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

github-actions bot commented Jun 9, 2023

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 Jun 9, 2023
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

7 participants