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

Uncaught TypeError: Cannot read property 'tagName' of null #1154

Closed
1 task done
jerryc127 opened this issue Apr 30, 2020 · 3 comments · Fixed by #1308
Closed
1 task done

Uncaught TypeError: Cannot read property 'tagName' of null #1154

jerryc127 opened this issue Apr 30, 2020 · 3 comments · Fixed by #1308
Labels
wait for information something is not clear, waiting for the author of the issue/pr

Comments

@jerryc127
Copy link

jerryc127 commented Apr 30, 2020

Bug Report

Steps to reproduce

add the darkmode button

What is current behaviour

What is the expected behaviour

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version:

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

https://docs.jerryc.me/src/bottom.js
I create the dark mode button,
it work fine.
but i check the console, it error show Uncaught TypeError: Cannot read property 'tagName' of null ?
what problem ? but the function is work fine.
image

@anikethsaha
Copy link
Member

can you mention how you added the dark mode.

also, please submit a reproducible sandbox

@anikethsaha anikethsaha added the wait for information something is not clear, waiting for the author of the issue/pr label May 25, 2020
@stale
Copy link

stale bot commented Jul 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 26, 2020
@sy-records sy-records reopened this Jul 26, 2020
@stale stale bot removed the wontfix label Jul 26, 2020
sy-records added a commit that referenced this issue Oct 22, 2021
Have a look at this issue #1154 .
https://codesandbox.io/s/loving-matsumoto-hp985?file=/index.html
Open devtools and click the *blank space* of svg(not path) will reproduce this issue.

`parentNode` may be `null`.
https://github.com/docsifyjs/docsify/blob/develop/src/core/router/history/html5.js#L25-L27

However, hash router has fixed this issue😜.
https://github.com/docsifyjs/docsify/blob/develop/src/core/router/history/hash.js#L47-L49

Co-authored-by: 沈唁 <52o@qq52o.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for information something is not clear, waiting for the author of the issue/pr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants