Open cmoad opened 7 years ago
@cmoad Ta for the report, I’ll have a look into it. I think I might actually remove this complexity from this plugin and recommend that people use the block breakout plugin instead (as it allows the same functionality across different block types).
@makenosound Quick update. I gave that plugin a try and it didn't change my issue.
Issue still persists as of 2.0.0.
"draft-js": "^0.10.1", "draft-js-autolist-plugin": "^2.0.0", "draft-js-plugins-editor": "^2.0.0-beta1",
I tried a vanilla create-react-app with the below dependencies and cannot reproduce the issue. I've yet to isolate why my project, which has the identical dependencies, does have the issue. I'll be sure to follow up if I can figure it out.
"draft-js": "^0.10.1", "draft-js-autolist-plugin": "^2.0.0", "draft-js-plugins-editor": "2.0.0-rc5",
@cmoad Ah, weird. Thanks for the extra info. If you manage to replicate it let me know and I’ll have a look.
Thanks for the plugin. It's been almost an immediate drop-in solution, but I'm unable to break out of lists when hitting enter on an empty line. I did some debugging and can see that the plugin is returning
handled
on thehandleReturn
callback when I hit return on an empty line. Any suggestions on how to debug why the block style is not actually toggling off?https://github.com/icelab/draft-js-autolist-plugin/blob/master/src/index.js#L110
I added a console log in my
onChange
handler:On return in an empty line I can see 2 changes happening. The first looks right. The second undoes the removal of the block type.
package.json: