From c5fe2e3d4b0572892e5426f184bdbd52097b9b52 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 23 Feb 2016 10:26:14 -0500 Subject: [PATCH 1/2] FIX: maybe fix crossed keybindings in ipython 4.1 --- .../backends/web_backend/nbagg_mpl.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/matplotlib/backends/web_backend/nbagg_mpl.js b/lib/matplotlib/backends/web_backend/nbagg_mpl.js index 9747995725b8..0a76ae90ebe5 100644 --- a/lib/matplotlib/backends/web_backend/nbagg_mpl.js +++ b/lib/matplotlib/backends/web_backend/nbagg_mpl.js @@ -156,23 +156,6 @@ mpl.figure.prototype._canvas_extra_style = function(el){ } -mpl.figure.prototype._key_event_extra = function(event, name) { - var manager = IPython.notebook.keyboard_manager; - if (!manager) - manager = IPython.keyboard_manager; - - // Check for shift+enter - if (event.shiftKey && event.which == 13) { - this.canvas_div.blur(); - event.shiftKey = false; - // Send a "J" for go to next cell - event.which = 74; - event.keyCode = 74; - manager.command_mode(); - manager.handle_keydown(event); - } -} - mpl.figure.prototype.handle_save = function(fig, msg) { fig.ondownload(fig, null); } From 513da025fea352bdbdec802cd4fa459fac213142 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 23 Feb 2016 10:45:55 -0500 Subject: [PATCH 2/2] FIX: more hack-and-slash testing --- .../backends/web_backend/nbagg_mpl.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/matplotlib/backends/web_backend/nbagg_mpl.js b/lib/matplotlib/backends/web_backend/nbagg_mpl.js index 0a76ae90ebe5..f7773f1f369b 100644 --- a/lib/matplotlib/backends/web_backend/nbagg_mpl.js +++ b/lib/matplotlib/backends/web_backend/nbagg_mpl.js @@ -139,23 +139,6 @@ mpl.figure.prototype._root_extra_style = function(el){ }); } -mpl.figure.prototype._canvas_extra_style = function(el){ - // this is important to make the div 'focusable - el.attr('tabindex', 0) - // reach out to IPython and tell the keyboard manager to turn it's self - // off when our div gets focus - - // location in version 3 - if (IPython.notebook.keyboard_manager) { - IPython.notebook.keyboard_manager.register_events(el); - } - else { - // location in version 2 - IPython.keyboard_manager.register_events(el); - } - -} - mpl.figure.prototype.handle_save = function(fig, msg) { fig.ondownload(fig, null); }