From 6735a47dcbead73a9520a32d30ab0c93328ed9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inez=20Korczyn=CC=81ski?= Date: Thu, 18 Oct 2012 13:22:20 -0700 Subject: [PATCH] Fix for native deletion - it was breaking document (model and view) when deleting really fast (holding the key for example). This solution completely fix the problem, however it is not optimal - stop and start is called more often than should be. Change-Id: Ied5b34f92056407311aa1e84fbff35943138987f --- modules/ve/ce/ve.ce.Surface.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 2829e449a2..3d8bfa5e83 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -460,10 +460,14 @@ ve.ce.Surface.prototype.onKeyDown = function ( e ) { // Backspace case 8: this.handleDelete( e, true ); + this.surfaceObserver.stop(true); + this.surfaceObserver.start(); break; // Delete case 46: this.handleDelete( e, false ); + this.surfaceObserver.stop(true); + this.surfaceObserver.start(); break; // B case 66: