https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112549

Revision: 112549
Author:   inez
Date:     2012-02-28 00:21:54 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Input implementation that seems to work in IE, FF and Chrome (all tested on 
Windows only)

Modified Paths:
--------------
    trunk/extensions/VisualEditor/demos/playground/playground.js

Modified: trunk/extensions/VisualEditor/demos/playground/playground.js
===================================================================
--- trunk/extensions/VisualEditor/demos/playground/playground.js        
2012-02-28 00:19:23 UTC (rev 112548)
+++ trunk/extensions/VisualEditor/demos/playground/playground.js        
2012-02-28 00:21:54 UTC (rev 112549)
@@ -93,7 +93,7 @@
                var     lengthDiff = text.length - this.prevText.length,
                        offsetDiff = offset - this.prevOffset;
 
-               if ( lengthDiff === offsetDiff && offset !== null && 
this.prevOffset !== null ) {
+               if ( lengthDiff === offsetDiff && offset !== null && 
this.prevOffset !== null && this.prevText.substring( 0, this.prevOffset ) === 
text.substring( 0, this.prevOffset ) ) {
                        console.log("new text", text.substring( 
this.prevOffset, offset ), this.prevOffset);
                } else {
                        var     sameFromLeft = 0,


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

Reply via email to