Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

If first action upon loading editor is checking a list item, error is thrown #89

Open
@wrobbinz

Description

@wrobbinz

Description
Given an initial editor state contains a checkable-list-item, and no action has been taken on the editor (i.e. refreshed page), toggling a checkbox in the editor will throw a console error.

Steps to Reproduce

  1. Set up minimal draftjs editor with markdown plugin.
  2. Provide an initial state that contains a checkbox
  3. Before any other action, check/uncheck the box

Expected
Checkbox is toggled and no error is thrown.

Actual Result
Checkbox is checked/unchecked and an error is thrown. There may be a slight delay when checking the box (minor if so)

Uncaught TypeError: Cannot read property 'nodeType' of null
    at editOnInput (editOnInput.js:52)
    at DraftEditor.react.js:216
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
    at Object.invokeGuardedCallback (react-dom.development.js:187)
    at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:201)
    at executeDispatch (react-dom.development.js:461)
    at executeDispatchesInOrder (react-dom.development.js:483)
    at executeDispatchesAndRelease (react-dom.development.js:581)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:592)
    at forEachAccumulated (react-dom.development.js:562)
    at runEventsInBatch (react-dom.development.js:723)
    at runExtractedEventsInBatch (react-dom.development.js:732)
    at handleTopLevel (react-dom.development.js:4472)
    at batchedUpdates$1 (react-dom.development.js:16537)
    at batchedUpdates (react-dom.development.js:2131)
    at dispatchEvent (react-dom.development.js:4551)
    at interactiveUpdates$1 (react-dom.development.js:16592)
    at interactiveUpdates (react-dom.development.js:2150)
    at dispatchInteractiveEvent (react-dom.development.js:4528)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions