Show More
@@ -588,7 +588,14 var IPython = (function (IPython) { | |||||
588 | e.on('focusout', function () { |
|
588 | e.on('focusout', function () { | |
589 | that.command_mode(); |
|
589 | that.command_mode(); | |
590 | that.enable(); |
|
590 | that.enable(); | |
591 | }) |
|
591 | }); | |
|
592 | // There are times (raw_input) where we remove the element from the DOM before | |||
|
593 | // focusout is called. In this case we bind to the remove event of jQueryUI, | |||
|
594 | // which gets triggered upon removal. | |||
|
595 | e.on('remove', function () { | |||
|
596 | that.command_mode(); | |||
|
597 | that.enable(); | |||
|
598 | }); | |||
592 | } |
|
599 | } | |
593 |
|
600 | |||
594 |
|
601 |
@@ -648,11 +648,18 var IPython = (function (IPython) { | |||||
648 | }) |
|
648 | }) | |
649 | ) |
|
649 | ) | |
650 | ); |
|
650 | ); | |
|
651 | ||||
651 | this.element.append(area); |
|
652 | this.element.append(area); | |
652 | // weirdly need double-focus now, |
|
653 | var raw_input = area.find('input.raw_input'); | |
653 | // otherwise only the cell will be focused |
|
654 | // Register events that enable/disable the keyboard manager while raw | |
654 | area.find("input.raw_input").focus().focus(); |
|
655 | // input is focused. | |
|
656 | IPython.keyboard_manager.register_events(raw_input); | |||
|
657 | // Note, the following line used to read raw_input.focus().focus(). | |||
|
658 | // This seemed to be needed otherwise only the cell would be focused. | |||
|
659 | // But with the modal UI, this seems to work fine with one call to focus(). | |||
|
660 | raw_input.focus(); | |||
655 | } |
|
661 | } | |
|
662 | ||||
656 | OutputArea.prototype._submit_raw_input = function (evt) { |
|
663 | OutputArea.prototype._submit_raw_input = function (evt) { | |
657 | var container = this.element.find("div.raw_input"); |
|
664 | var container = this.element.find("div.raw_input"); | |
658 | var theprompt = container.find("span.input_prompt"); |
|
665 | var theprompt = container.find("span.input_prompt"); |
General Comments 0
You need to be logged in to leave comments.
Login now