Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js |
— | — | @@ -171,15 +171,14 @@ |
172 | 172 | // we don't like how browsers cut, so let's undo it and do it ourselves. |
173 | 173 | document.execCommand('undo', false, false); |
174 | 174 | |
175 | | - var selection = _this.getSelectionRange(), |
176 | | - node = rangy.getSelection().anchorNode; |
| 175 | + var selection = _this.getSelectionRange(); |
177 | 176 | |
178 | 177 | // transact |
179 | 178 | var tx = _this.model.getDocument().prepareRemoval( selection ); |
| 179 | + |
| 180 | + _this.autoRender = true; |
180 | 181 | _this.model.transact( tx ); |
181 | | - |
182 | | - // re-render |
183 | | - _this.getLeafNode( node ).data( 'view' ).renderContent(); |
| 182 | + _this.autoRender = false; |
184 | 183 | |
185 | 184 | _this.clearPollData(); |
186 | 185 | |
— | — | @@ -191,8 +190,7 @@ |
192 | 191 | |
193 | 192 | ve.ce.Surface.prototype.onPaste = function( e ) { |
194 | 193 | var _this = this, |
195 | | - insertionPoint = _this.getSelectionRange().start, |
196 | | - node = rangy.getSelection().anchorNode; |
| 194 | + insertionPoint = _this.getSelectionRange().start; |
197 | 195 | |
198 | 196 | $('#paste') |
199 | 197 | .html('') |