mediawiki-extensions-Visual.../modules/ve/dm
Roan Kattouw 39eea83698 Fix spurious MetaList events
Moving items around in the MetaList only works if all deletions are
done before all insertions. This was almost but not completely true:
when moving an existing item we would delete it and immediately re-
insert it, meaning that if there were multiple items being moved
there would be a removal after an insertion.

Instead, let the insertion loop re-insert the moved items while
making sure not to emit insert events for them. This is how I
originally intended the code to be structured, but I thought that
duplicating the insertion would be equivalent to protecting the
emission of the insertion event. Clearly I was wrong.

This fixes weird bugs where categories sometimes appeared twice
in the category dialog depending on where the category was in
the list and what the exact length of the list was (i.e., whether
the binary search in the MetaList found the first or second item
with identical offset and index).

Change-Id: I4cd131052dda396add7a0e2dbe2383bb5c1b5721
2013-12-03 22:48:50 +00:00
..
annotations Get rid of dmRendering hack in ve.ce.MWInternalLinkAnnotation 2013-10-28 15:49:08 +00:00
lineardata Plain text paste with paste special 2013-11-26 18:23:58 +00:00
metaitems Remove ve.{inheritClass,mixinClass} and use OO instead 2013-10-18 18:58:08 +02:00
nodes doc: Adding missing @static to a static dm.GeneratedContentNode method 2013-10-23 22:08:47 +02:00
ve.dm.Annotation.js doc: Get rid of 'static' property container in jsduck index 2013-11-19 10:21:39 +00:00
ve.dm.AnnotationFactory.js Remove ve.Factory and ve.Registry and use oojs instead 2013-10-22 19:15:18 +00:00
ve.dm.AnnotationSet.js Remove simpleArray utilities from ve.js and use oojs instead 2013-10-23 03:26:53 +02:00
ve.dm.BranchNode.js Rename @emits to @fires so we're forward compatible with JSDuck 5 2013-10-22 19:11:16 +00:00
ve.dm.Converter.js Store inner whitespace of the body and compare it on conversion 2013-10-31 17:09:06 +01:00
ve.dm.DataString.js Remove ve.{inheritClass,mixinClass} and use OO instead 2013-10-18 18:58:08 +02:00
ve.dm.Document.js Rich paste 2013-11-26 18:23:12 +00:00
ve.dm.DocumentSlice.js Rich paste 2013-11-26 18:23:12 +00:00
ve.dm.DocumentSynchronizer.js Remove ve.getHash and use getHash from oojs instead 2013-10-22 19:14:23 +00:00
ve.dm.IndexValueStore.js Remove ve.getHash and use getHash from oojs instead 2013-10-22 19:14:23 +00:00
ve.dm.InternalList.js Resolve rendered URLs according to the provided <base> 2013-10-28 15:16:05 +00:00
ve.dm.js
ve.dm.LeafNode.js Remove ve.{inheritClass,mixinClass} and use OO instead 2013-10-18 18:58:08 +02:00
ve.dm.LinearData.js Plain text paste with paste special 2013-11-26 18:23:58 +00:00
ve.dm.MetaItem.js doc: Get rid of 'static' property container in jsduck index 2013-11-19 10:21:39 +00:00
ve.dm.MetaItemFactory.js Remove ve.Factory and ve.Registry and use oojs instead 2013-10-22 19:15:18 +00:00
ve.dm.MetaList.js Fix spurious MetaList events 2013-12-03 22:48:50 +00:00
ve.dm.Model.js doc: Get rid of 'static' property container in jsduck index 2013-11-19 10:21:39 +00:00
ve.dm.ModelRegistry.js dm.ModelRegistry: Fix documentation for #addType 2013-10-31 01:30:07 +01:00
ve.dm.Node.js Rich paste 2013-11-26 18:23:12 +00:00
ve.dm.NodeFactory.js Remove ve.Factory and ve.Registry and use oojs instead 2013-10-22 19:15:18 +00:00
ve.dm.Surface.js Remove SurfaceObserver locking (unused) 2013-10-25 18:29:49 +01:00
ve.dm.SurfaceFragment.js .change( null, foo ) -> .setSelection( foo ) 2013-10-25 18:29:49 +01:00
ve.dm.Transaction.js Fix JS errors when inserting references 2013-12-02 11:35:00 -08:00
ve.dm.TransactionProcessor.js Get rid of 'reversed' flag on transactions 2013-10-02 19:37:08 -07:00