Editor.js: Cannot add items to list converted from paragraph

Created on 13 Dec 2019  路  3Comments  路  Source: codex-team/editor.js

To reproduce:

  1. Write a paragraph
  2. Convert to list
  3. Press the return key to add a new item to the list - it does not work
bug

Most helpful comment

After further investigating this issue, turns out there is a logic in src/components/modules/toolbar/inline.ts where the order should be the other way around:

this.Editor.Listeners.on(this.nodes.conversionToggler, 'click', () => {
  this.Editor.ConversionToolbar.toggle((conversionToolbarOpened) => {
    if (conversionToolbarOpened) {
      this.flipper.deactivate();
    } else {
      this.flipper.activate();
    }
  });
});

When convertion toolbar opens, it should activate, when it is closed, it should deactivate. Currently it is the exact opposite.

All 3 comments

Just played around with this. First thing I recognized is that it doesn鈥榯 matter what kind of conversion is done. Paragraph to heading also leads to non-working lists.

I think there is an event handler inside the flipper component which stops propagation of the keys that are registered in the component.

After further investigating this issue, turns out there is a logic in src/components/modules/toolbar/inline.ts where the order should be the other way around:

this.Editor.Listeners.on(this.nodes.conversionToggler, 'click', () => {
  this.Editor.ConversionToolbar.toggle((conversionToolbarOpened) => {
    if (conversionToolbarOpened) {
      this.flipper.deactivate();
    } else {
      this.flipper.activate();
    }
  });
});

When convertion toolbar opens, it should activate, when it is closed, it should deactivate. Currently it is the exact opposite.

Resolved by #1001
Released in 2.17.0

Thanks to @aablinov and @khaydarov

Was this page helpful?
1 / 5 - 1 ratings

Related issues

Someskumarasamy picture Someskumarasamy  路  4Comments

chouglesaud picture chouglesaud  路  3Comments

cossssmin picture cossssmin  路  3Comments

hata6502 picture hata6502  路  3Comments

natterstefan picture natterstefan  路  5Comments