Changes between Version 2 and Version 3 of Ticket #12087, comment 4
- Timestamp:
- Jul 2, 2015, 3:21:03 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12087, comment 4
v2 v3 3 3 4 4 {{{ 5 onKeyDown: function(e) {5 handleKeyDown: function(e) { 6 6 if (e.which === KeyCodes.BACKSPACE || e.which === KeyCodes.DELETE) { 7 7 var range = this.editor.getSelection().getRanges()[0]; … … 15 15 } 16 16 17 // Is the previous node not a widget? 18 if (!startNode.getPrevious() || 19 !startNode.getPrevious().$.dataset.ckeWidgetId) { 17 var previousNode = startNode.getPrevious(); 18 19 // Bail if the previous node is not a widget. 20 if (previousNode && 21 (!previousNode.$.dataset || 22 !previousNode.$.dataset.ckeWidgetId)) { 20 23 return; 21 24 } … … 24 27 if (!startNode.getText().trim()) { 25 28 startNode.remove(); 29 this.updateModel(); 26 30 } 27 31 }