[go: nahoru, domu]

Skip to content

Commit

Permalink
Squashed 'libs/editor/' changes from 10ae495..2c183ac
Browse files Browse the repository at this point in the history
2c183ac Merge pull request #397 from wordpress-mobile/issue/396-wrapinparagraph-null-error
d3216df Fix #396: null closerParentNode in wrapCaretInParagraphIfNecessary

git-subtree-dir: libs/editor
git-subtree-split: 2c183acd48dd31b1ca0e6820dae09b02fa12110e
  • Loading branch information
maxme committed Jun 3, 2016
1 parent 961a76c commit e8a087f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libs/editor-common/assets/ZSSRichTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3553,9 +3553,13 @@ ZSSField.prototype.disableEditing = function () {
* @details A parent paragraph node should be added if the current parent is either the field
* node itself, or a blockquote node.
*/
ZSSField.prototype.wrapCaretInParagraphIfNecessary = function()
{
ZSSField.prototype.wrapCaretInParagraphIfNecessary = function() {
var closerParentNode = ZSSEditor.closerParentNode();

if (closerParentNode == null) {
return;
}

var parentNodeShouldBeParagraph = (closerParentNode == this.getWrappedDomNode()
|| closerParentNode.nodeName == NodeName.BLOCKQUOTE);

Expand Down

0 comments on commit e8a087f

Please sign in to comment.