##// END OF EJS Templates
Fixed rebase problems
Jonathan Frederic -
Show More
@@ -748,14 +748,22 var IPython = (function (IPython) {
748
748
749 KeyboardManager.prototype.register_events = function (e) {
749 KeyboardManager.prototype.register_events = function (e) {
750 var that = this;
750 var that = this;
751 e.on('focusin', function () {
751 var handle_focus = function () {
752 console.log('kb focus in');
752 console.log('kb focus in');
753 that.disable();
753 that.disable();
754 });
754 };
755 e.on('focusout', function () {
755 var handle_blur = function () {
756 console.log('kb focus out');
756 console.log('kb focus out');
757 that.enable();
757 that.enable();
758 });
758 };
759 e.on('focusin', handle_focus);
760 e.on('focusout', handle_blur);
761 // TODO: Very strange. The focusout event does not seem fire for the
762 // bootstrap text boxes on FF25&26...
763 e.find('*').blur(handle_blur);
764 e.on('DOMNodeInserted', function () {
765 e.find('*').blur(handle_blur);
766 });
759 // There are times (raw_input) where we remove the element from the DOM before
767 // There are times (raw_input) where we remove the element from the DOM before
760 // focusout is called. In this case we bind to the remove event of jQueryUI,
768 // focusout is called. In this case we bind to the remove event of jQueryUI,
761 // which gets triggered upon removal, iff it is focused at the time.
769 // which gets triggered upon removal, iff it is focused at the time.
General Comments 0
You need to be logged in to leave comments. Login now