diff --git a/notebook/static/notebook/js/commandpalette.js b/notebook/static/notebook/js/commandpalette.js index baa7e203a..d85bfc71b 100644 --- a/notebook/static/notebook/js/commandpalette.js +++ b/notebook/static/notebook/js/commandpalette.js @@ -122,9 +122,9 @@ define(function(require){ */ var onResult = function(node, query, result, resultCount) { if (resultCount == 1) { - setTimeout(function() { + window.requestAnimationFrame(function() { $('.typeahead-list > li:nth-child(2)').addClass('active'); - }, 0); + }); } };