Closed dkhd closed 4 years ago
This moving toolbar issue can be fixed by not putting the <InlineToolbar />
as a prop value of <DraftailEditor />
component as stated in this page. It works, but it doesn't behave as I expected to.
So, if you want to use this plugin, please refer to DraftJS plugin page instead.
Describe the bug
Hi team,
I found a problem when using the customized toolbar (inline toolbar plugin) from this page along with
onSave
prop together.The problem is, everytime the text is selected, the toolbar is moving to another place. This is not happening when the
onSave
prop is not being used or disabled.Note: I like the inline toolbar plugin very much, but I cannot save the document if I didn't use the
onSave
prop (I put the content from theonSave
to a temporary var, and save it to the database with a trigger of a button). I've tried to replaceonSave
toonChange
but I cannot write anything in the editor (is it another bug or I use it the wrong way?) so that's why I still stick toonSave
right now. Or is there any better way to save the document that doesn't involveonSave
?Which terms did you search for in the documentation and issue tracker?
onSave
Environment
Browser:
Steps to reproduce
Use the
draft-js-inline-toolbar-plugin
andonSave
prop altogether.Expected behavior
The toolbar should not move anywhere when
inline-toolbar-plugin
andonSave
prop are being used altogether.Actual behavior
The toolbar is moving to another place. Please see the screen capture below.
Reproducible demo
It is in my local machine