Show More
@@ -107,7 +107,6 b' define(function(require){' | |||
|
107 | 107 | var index = env.notebook.get_selected_index(); |
|
108 | 108 | env.notebook.cut_cell(); |
|
109 | 109 | env.notebook.select(index); |
|
110 | env.notebook.focus_cell(); | |
|
111 | 110 | } |
|
112 | 111 | }, |
|
113 | 112 | 'copy-selected-cell' : { |
@@ -115,7 +114,6 b' define(function(require){' | |||
|
115 | 114 | help_index : 'ef', |
|
116 | 115 | handler : function (env) { |
|
117 | 116 | env.notebook.copy_cell(); |
|
118 | env.notebook.focus_cell(); | |
|
119 | 117 | } |
|
120 | 118 | }, |
|
121 | 119 | 'paste-cell-before' : { |
@@ -268,7 +266,6 b' define(function(require){' | |||
|
268 | 266 | help_index : 'ha', |
|
269 | 267 | handler : function (env) { |
|
270 | 268 | env.notebook.kernel.interrupt(); |
|
271 | env.notebook.focus_cell(); | |
|
272 | 269 | } |
|
273 | 270 | }, |
|
274 | 271 | 'restart-kernel':{ |
@@ -276,7 +273,6 b' define(function(require){' | |||
|
276 | 273 | help_index : 'hb', |
|
277 | 274 | handler : function (env) { |
|
278 | 275 | env.notebook.restart_kernel(); |
|
279 | env.notebook.focus_cell(); | |
|
280 | 276 | } |
|
281 | 277 | }, |
|
282 | 278 | 'undo-last-cell-deletion' : { |
@@ -381,7 +377,6 b' define(function(require){' | |||
|
381 | 377 | if(event){ |
|
382 | 378 | event.preventDefault(); |
|
383 | 379 | } |
|
384 | env.notebook.ensure_focused(); | |
|
385 | 380 | return false; |
|
386 | 381 | } |
|
387 | 382 | }, |
@@ -25,7 +25,6 b' define([' | |||
|
25 | 25 | this.events = options.events; |
|
26 | 26 | this.notebook = options.notebook; |
|
27 | 27 | this._make(); |
|
28 | this.notebook.keyboard_manager.register_events(this.element); | |
|
29 | 28 | Object.seal(this); |
|
30 | 29 | }; |
|
31 | 30 | |
@@ -74,6 +73,7 b' define([' | |||
|
74 | 73 | .append($('<option/>').attr('value','markdown').text('Markdown')) |
|
75 | 74 | .append($('<option/>').attr('value','raw').text('Raw NBConvert')) |
|
76 | 75 | .append($('<option/>').attr('value','heading').text('Heading')); |
|
76 | this.notebook.keyboard_manager.register_events(sel); | |
|
77 | 77 | this.events.on('selected_cell_type_changed.Notebook', function (event, data) { |
|
78 | 78 | if (data.cell_type === 'heading') { |
|
79 | 79 | sel.val('Markdown'); |
@@ -126,6 +126,7 b' define([' | |||
|
126 | 126 | } |
|
127 | 127 | that.notebook.focus_cell(); |
|
128 | 128 | }); |
|
129 | this.notebook.keyboard_manager.register_events(select); | |
|
129 | 130 | // Setup the currently registered presets. |
|
130 | 131 | var presets = celltoolbar.CellToolbar.list_presets(); |
|
131 | 132 | for (var i=0; i<presets.length; i++) { |
@@ -663,10 +663,9 b' define(function (require) {' | |||
|
663 | 663 | Notebook.prototype.command_mode = function () { |
|
664 | 664 | var cell = this.get_cell(this.get_edit_index()); |
|
665 | 665 | if (cell && this.mode !== 'command') { |
|
666 |
// We don't call cell.command_mode, but rather |
|
|
667 |
// which will |
|
|
668 | // handle_command_mode. | |
|
669 | cell.focus_cell(); | |
|
666 | // We don't call cell.command_mode, but rather blur the CM editor | |
|
667 | // which will trigger the call to handle_command_mode. | |
|
668 | cell.code_mirror.getInputField().blur(); | |
|
670 | 669 | } |
|
671 | 670 | }; |
|
672 | 671 |
General Comments 0
You need to be logged in to leave comments.
Login now