Skip to content

Nesting within a card returns an error due to undefined section #142

@knownasilya

Description

@knownasilya

screen shot 2017-09-26 at 12 12 11 am

TypeError: Cannot read property 'isNested' of null
    at editor.js:1188
    at Editor.run (editor.js:755)
    at Editor.insertCard (editor.js:1176)
    at Class._addCard (component.js:351)
    at Class.addCard (component.js:113)
    at Backburner.join (backburner.js:567)
    at Function.run$1.join (ember-metal.js:4370)
    at action.js:388
    at exports.flaggedInstrument (ember-metal.js:3797)
    at EmptyObject.addCard (action.js:387)

My code looks something like this:

<section>
  <button onclick={{action editCard}} type='button'>Edit</button>
</section>
{{mobiledoc-editor}}

Full code is here https://github.com/knownasilya/ember-mobiledoc-grid/blob/master/addon/components/grid-cards-row/template.hbs

This is within a display card. The card is added to the editor, when I click inside the card and try to addCard inside this nested editor, it errors in this way.

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