File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ define([
73
73
this . events . trigger ( 'kernelspecs_loaded.KernelSpec' , data . kernelspecs ) ;
74
74
} ;
75
75
76
- NewNotebookWidget . prototype . new_notebook = function ( kernel_name ) {
76
+ NewNotebookWidget . prototype . new_notebook = function ( kernel_name , evt ) {
77
77
/** create and open a new notebook */
78
78
var that = this ;
79
79
kernel_name = kernel_name || this . default_kernel ;
@@ -107,6 +107,9 @@ define([
107
107
}
108
108
} ) ;
109
109
} ) ;
110
+ if ( evt !== undefined ) {
111
+ evt . preventDefault ( ) ;
112
+ }
110
113
} ;
111
114
112
115
return { 'NewNotebookWidget' : NewNotebookWidget } ;
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ define([
169
169
console . warn ( 'Error during New file creation' , e ) ;
170
170
} ) ;
171
171
that . load_sessions ( ) ;
172
+ e . preventDefault ( ) ;
172
173
} ) ;
173
174
$ ( '#new-folder' ) . click ( function ( e ) {
174
175
that . contents . new_untitled ( that . notebook_path || '' , { type : 'directory' } )
@@ -189,6 +190,7 @@ define([
189
190
console . warn ( 'Error during New directory creation' , e ) ;
190
191
} ) ;
191
192
that . load_sessions ( ) ;
193
+ e . preventDefault ( ) ;
192
194
} ) ;
193
195
194
196
// Bind events for action buttons.
@@ -373,8 +375,8 @@ define([
373
375
breadcrumb . append ( root ) ;
374
376
var path_parts = [ ] ;
375
377
this . notebook_path . split ( '/' ) . forEach ( function ( path_part ) {
376
- path_parts . push ( path_part )
377
- var path = path_parts . join ( '/' )
378
+ path_parts . push ( path_part ) ;
379
+ var path = path_parts . join ( '/' ) ;
378
380
var url = utils . url_path_join (
379
381
that . base_url ,
380
382
'/tree' ,
You can’t perform that action at this time.
0 commit comments