Divec has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/178640

Change subject: Normalize split text nodes correctly
......................................................................

Normalize split text nodes correctly

Call .normalize() on the parent of the split text nodes, rather than on one of
the split text nodes itself.

Change-Id: I1dd9eb4bd523cf89d9a676cd9ac99d47ec253dea
---
M src/ce/ve.ce.Surface.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/40/178640/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index a48c1a3..b7da5b7 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2597,7 +2597,7 @@
        }
        // If we did text node splitting, try and patch things up
        if ( endNode && endNode.nodeType === Node.TEXT_NODE ) {
-               ve.normalizeNode( endNode );
+               ve.normalizeNode( endNode.parentNode );
        }
        setTimeout( function () {
                var viewNode, newRange;

-- 
To view, visit https://gerrit.wikimedia.org/r/178640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dd9eb4bd523cf89d9a676cd9ac99d47ec253dea
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to