question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read property 'classList' of null

See original GitHub issue

Describe the bug A clear and concise description of what the bug is. Uncaught TypeError: Cannot read property 'classList' of null

To Reproduce Steps to reproduce the behavior:

I use only Native HTML, CSS, JAVASCRIPT

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css" />
    <link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
</head>
<body>
    <!-- ERROR -->
    <!--
    <form>
        <div id="editor"></div>
    </form>
    -->
    <div id="editor"></div>

    <script src="https://code.jquery.com/jquery-latest.min.js"></script>
    <script src="https://uicdn.toast.com/editor/latest/toastui-jquery-editor.min.js"></script>
    <!-- <script src="https://uicdn.toast.com/editor/latest/i18n/ko-kr.js"></script> -->
    <script>
        const option = {
            initialEditType: 'wysiwyg',
            height: '500px'
        };
        const editor = $('#editor').toastuiEditor(option);
    </script>
</body>
</html>

Expected behavior A clear and concise description of what you expected to happen.

“I cannot use editor with wrapping by <form> tag”

Screenshots If applicable, add screenshots to help explain your problem.

Console

Uncaught TypeError: Cannot read property 'classList' of null
    at e.exports (toastui-jquery-editor.min.js:14)
    at r.i._updateClassByButton (toastui-jquery-editor.min.js:30)
    at r.i._activateTabByButton (toastui-jquery-editor.min.js:30)
    at r.i.activate (toastui-jquery-editor.min.js:30)
    at r.i._render (toastui-jquery-editor.min.js:30)
    at new r (toastui-jquery-editor.min.js:30)
    at r.i._initDOM (toastui-jquery-editor.min.js:30)
    at r [as constructor] (toastui-jquery-editor.min.js:30)
    at new r (toastui-jquery-editor.min.js:30)
    at e.t._initPopupAddImage (toastui-jquery-editor.min.js:30)

Device Information -> SKIP

Additional context Add any other context about the problem here.

I want to use i18n with JQuery. But I got error When I add script line in document, ko-kr.js

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
seonim-ryucommented, Apr 16, 2020

@YBAZAN @gowda-nirmal @mieszko4 The npm release will be done later this month.

4reactions
NateScarletcommented, Mar 23, 2020

Is there any reason you should write like this?

I think submit markdown data with form is a common usecase.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'classList' of null
It means that document.getElementById("lastName") is returning undefined and you're trying to call classList on undefined itself.
Read more >
TypeError: Cannot read property 'classList' of Null in JS
The "Cannot read property 'classList' of null" error occurs when trying to access the classList property on a null value. To solve the...
Read more >
[Input Masks Library] Cannot read property 'classList' of null
Hi there,. I am using the credit card mask but i keep receveing the error Cannot read property 'classList' of null every time...
Read more >
Cannot read property 'classList' of null - responsive menu
My understanding is that the script is trying to remove navTop.classList.remove(“responsive”); however fails to do so. The CSS can be found here http:// ......
Read more >
menu – Cannot read property 'classList' of null - WordPress.org
I am trying to convert this site http://buildandtest.atspace.cc/ into twentysixteen child theme. It appears that /js/menu.js in my child theme is not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found