vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

DOMException: Failed to execute 'querySelector' on 'Document'

Open hellothursday opened this issue 3 years ago • 4 comments

  • [x] I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

open this link in Chrome , and refresh the page: https://vuepress.vuejs.org/zh/guide/assets.html#%E7%9B%B8%E5%AF%B9%E8%B7%AF%E5%BE%84

you will get

What is expected?

Normally there is no error

What is actually happening?

Chinese characters “#相对路径” are parsed as "#%E7%9B%B8%E5%AF%B9%E8%B7%AF%E5%BE%84" , that cause querySelector parsing error.

this problem may be related to vue-router.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
 System:
    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
 Browsers:
    Chrome: 86.0.4240.75
    Edge: Not Found
    Firefox: 80.0.1
    Safari: 14.0

hellothursday avatar Oct 13 '20 04:10 hellothursday

Same console error show if the url link includes Chinese characters.

YongquanYao avatar Nov 03 '20 00:11 YongquanYao

I have met the same problem, because the url includes Chinese characters, http://localhost:8082/ui/design/color.html#%E4%B8%BB%E8%89%B2

Is there any solution?

zwf193071 avatar Dec 15 '21 07:12 zwf193071

I'm getting the same problem even though the url doesn't include foreign characters.
Screenshot 2022-07-30 at 23 55 57

pavinduLakshan avatar Jul 30 '22 18:07 pavinduLakshan

The issue remains unresolved

Bittersweet-Chocolate avatar Aug 15 '23 09:08 Bittersweet-Chocolate