From 76ef9d0a5fca4bb3b61bcbed21e75c2dc61ffd2a Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Thu, 21 Jul 2011 14:37:25 -0400 Subject: [PATCH] Prevent keyboard navigation from within input elements in shared visualizations. --- templates/visualization/display.mako | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/visualization/display.mako b/templates/visualization/display.mako index bcf2cbd86c5..9c7b03adc4a 100644 --- a/templates/visualization/display.mako +++ b/templates/visualization/display.mako @@ -122,6 +122,11 @@ // Keyboard navigation. Scroll ~7% of height when scrolling up/down. // $(document).keydown(function(e) { + // Do not navigate if arrow keys used in input element. + if ($(e.srcElement).is(':input')) { + return; + } + // Key codes: left == 37, up == 38, right == 39, down == 40 switch(e.which) { case 37: