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

Anchor 组件内部 querySelector 选取特殊 id 报错 #3844

Closed
nikogu opened this issue Nov 15, 2016 · 1 comment · Fixed by #3853
Closed

Anchor 组件内部 querySelector 选取特殊 id 报错 #3844

nikogu opened this issue Nov 15, 2016 · 1 comment · Fixed by #3853
Assignees

Comments

@nikogu
Copy link
Contributor

nikogu commented Nov 15, 2016

版本:antd 2.4.2

场景:如果内容的id为:<div id="0.12.x-=>-1.0.x" ></div>,那么 querySelector 回报错的:Failed to execute 'querySelector' on 'Document': '#0.12.x-=>-1.0.x' is not a valid selector

建议:因为 Anchor 里面选择的都是 id ,建议直接使用 getElementById

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants