diff --git a/docs/tutorial/conf_files/volvox.json b/docs/tutorial/conf_files/volvox.json index 8abdc62d9f..4de722d877 100644 --- a/docs/tutorial/conf_files/volvox.json +++ b/docs/tutorial/conf_files/volvox.json @@ -146,7 +146,8 @@ "CDS" : "transcript-CDS", "UTR" : "transcript-UTR" }, - "subfeatures" : true + "subfeatures" : true, + "onClick": "function() { alert('Ran arbitrary JavaScript!'); };" }, { "feature" : [ diff --git a/src/JBrowse/View/Track/HTMLFeatures.js b/src/JBrowse/View/Track/HTMLFeatures.js index 49d819e0cd..26ed176404 100644 --- a/src/JBrowse/View/Track/HTMLFeatures.js +++ b/src/JBrowse/View/Track/HTMLFeatures.js @@ -939,8 +939,8 @@ var HTMLFeatures = declare( BlockBased, _makeClickHandler: function( inputSpec, context ) { var track = this; - if( typeof spec == 'function' ) { - inputSpec = { action: spec }; + if( typeof inputSpec == 'function' ) { + inputSpec = { action: inputSpec }; } var handler = function ( evt ) {