提交 f72f7e59 编写于 作者: M Mr.doob

Editor: Added backspace to delete back. See #6553.

上级 c7d9c161
......@@ -232,8 +232,17 @@
switch ( event.keyCode ) {
case 8: // prevent browser back
event.preventDefault();
case 8:
event.preventDefault(); // prevent browser back
var object = editor.selected;
if ( confirm( 'Delete ' + object.name + '?' ) === false ) return;
var parent = object.parent;
editor.removeObject( object );
editor.select( parent );
break;
}
......
......@@ -41,7 +41,7 @@ Menubar.Edit = function ( editor ) {
option.setClass( 'option' );
option.setTextContent( 'Delete' );
option.onClick( function () {
var object = editor.selected;
if ( confirm( 'Delete ' + object.name + '?' ) === false ) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册