guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.5k stars 245 forks source link

Pressing enter or delete before a table adds extra paragraphs #243

Closed bradvogel closed 10 years ago

bradvogel commented 10 years ago

If you insert a <table> element and then put the cursor somewhere above the table, pressing enter will add an extra paragraph. The delete key also adds a paragraph. Seems to be a formatter issue.

Tested with Chrome 36 for OS X.

Here's a repro case: https://dl.dropboxusercontent.com/u/14168496/scribe_bug/index.html

The same behavior doesn't happen in a regular contenteditable.

bradvogel commented 10 years ago

Turns out the fix is trivial - I believe. The table element just needs to be added to the hardcoded list of block level elements. See https://github.com/guardian/scribe-common/pull/6.

hmgibson23 commented 10 years ago

Am closing this, as the PR is submitted.