File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ $(document).ready(function() {
109109 // jsPlumb connectors won't render properly
110110 myVisualizer . updateOutput ( ) ;
111111
112+ // grab focus so that keyboard events work
113+ myVisualizer . grabKeyboardFocus ( ) ;
114+
112115 // customize edit button click functionality AFTER rendering (TODO: awkward!)
113116 $ ( '#pyOutputPane #editBtn' ) . click ( function ( ) {
114117 enterEditMode ( ) ;
Original file line number Diff line number Diff line change @@ -395,6 +395,11 @@ ExecutionVisualizer.prototype.setKeyboardBindings = function() {
395395}
396396
397397
398+ ExecutionVisualizer . prototype . grabKeyboardFocus = function ( ) {
399+ this . domRoot . find ( 'td#left_pane' ) . focus ( ) ;
400+ }
401+
402+
398403ExecutionVisualizer . prototype . renderPyCodeOutput = function ( ) {
399404 var myViz = this ; // to prevent confusion of 'this' inside of nested functions
400405
You can’t perform that action at this time.
0 commit comments