Divec has uploaded a new change for review.

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

Change subject: Make the DOM hash ignore text node splitting
......................................................................

Make the DOM hash ignore text node splitting

Chromium splits text nodes on cursoring. This should not be signalled as a
content change to the DM; therefore the DOM hash should not change.

ve.ce.js
* getDomHash: use a single '#' for any number of adjacent text nodes

Change-Id: Ia04f7195ef62ff35a1bc1da6f0c7b40bbcc3ae2c
---
M modules/ve/ce/ve.ce.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/57/125757/1

diff --git a/modules/ve/ce/ve.ce.js b/modules/ve/ce/ve.ce.js
index 8a2a922..8e8754a 100644
--- a/modules/ve/ce/ve.ce.js
+++ b/modules/ve/ce/ve.ce.js
@@ -105,6 +105,8 @@
                        hash += ve.ce.getDomHash( element );
                }
                hash += '</' + nodeName + '>';
+               // Merge adjacent text node representations
+               hash = hash.replace( /##+/g, '#' );
        }
        return hash;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia04f7195ef62ff35a1bc1da6f0c7b40bbcc3ae2c
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