Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -345,6 +345,16 @@ |
346 | 346 | |
347 | 347 | break; |
348 | 348 | case 46: // Delete |
| 349 | + this.selection.normalize(); |
| 350 | + |
| 351 | + if ( this.selection.from != this.selection.to ) { // delete selection |
| 352 | + var tx = this.documentView.model.prepareRemoval( this.selection ); |
| 353 | + this.documentView.model.commit ( tx ); |
| 354 | + this.documentView.clearSelection(); |
| 355 | + this.selection.from = this.selection.to = this.selection.start; |
| 356 | + this.showCursor(); |
| 357 | + } |
| 358 | + |
349 | 359 | break; |
350 | 360 | default: // Insert content (maybe) |
351 | 361 | if ( this.keyboard.keydownTimeout ) { |