File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
plugins/dev-tools/src/playground Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -594,8 +594,8 @@ function registerEditorCommands(editor, playground) {
594594 try {
595595 Blockly . serialization . workspaces . load ( JSON . parse ( json ) , workspace ) ;
596596 } catch ( e ) {
597- // If this fails that's fine .
598- return false ;
597+ // If this fails fall back to trying to load XML instead .
598+ return loadXml ( ) ;
599599 }
600600 return true ;
601601 } ;
@@ -661,14 +661,4 @@ function registerEditorCommands(editor, playground) {
661661 contextMenuOrder : 1 ,
662662 run : save ,
663663 } ) ;
664- document . addEventListener ( 'keydown' , ( e ) => {
665- const ctrlCmd = e . metaKey || e . ctrlKey ;
666- if ( ctrlCmd && e . key === 's' ) {
667- save ( ) ;
668- e . preventDefault ( ) ;
669- } else if ( ctrlCmd && e . key === 'Enter' ) {
670- if ( ! loadJson ( ) ) loadXml ( ) ;
671- e . preventDefault ( ) ;
672- }
673- } ) ;
674664}
You can’t perform that action at this time.
0 commit comments