globocom / megadraft

Megadraft is a Rich Text editor built on top of Facebook's Draft.JS featuring a nice default base of components and extensibility

Home Page:http://megadraft.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delay in plugin button rendering when movableBlocks prop is active

mogavin opened this issue · comments

Expected Behavior

In the initial rendering of the editor with prop movableBlocks active, when clicking inside a different block from the first one, the plugins button should be moved to this block.

Current Behavior

On the first click in a different block than the first the plugins button not move. The movement occurs only after the second click.

Steps to Reproduce

  1. Render a MegadraftEditor component with prop movableBlocks with true value;
  2. Insert some blocks (text, image, video);
  3. Click on any block other than the first. Plugins button will not be moved to this block;
  4. Click on the same block again. Now the plugins button will be moved to this block.