Index: trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js |
— | — | @@ -75,16 +75,18 @@ |
76 | 76 | } |
77 | 77 | data = data.concat( [ { 'type': '/list' } ] ); |
78 | 78 | |
79 | | - tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval( |
80 | | - new es.Range( insertAt, insertAt+removeLength) |
81 | | - ); |
82 | | - this.toolbar.surfaceView.model.transact( tx ); |
83 | | - |
84 | 79 | tx = this.toolbar.surfaceView.model.getDocument().prepareInsertion( |
85 | 80 | insertAt, |
86 | 81 | data |
87 | 82 | ); |
88 | 83 | this.toolbar.surfaceView.model.transact( tx ); |
| 84 | + |
| 85 | + tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval( |
| 86 | + new es.Range( insertAt+data.length, insertAt+removeLength+data.length) |
| 87 | + ); |
| 88 | + this.toolbar.surfaceView.model.transact( tx ); |
| 89 | + |
| 90 | + |
89 | 91 | } |
90 | 92 | }; |
91 | 93 | |