From 14e049631ea5771366dea744e7488b5a40778a18 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 27 Jan 2011 14:17:35 -0500 Subject: [PATCH] -should fix delay in rendering the now playing bar when song starts. --- public/js/playlist/playlist.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/playlist/playlist.js b/public/js/playlist/playlist.js index d5d1975ea..02e5934d6 100644 --- a/public/js/playlist/playlist.js +++ b/public/js/playlist/playlist.js @@ -29,8 +29,11 @@ function registerSongEndListener(func){ } function notifySongEndListener(){ - if (typeof songEndFunc == "function") - songEndFunc(); + if (typeof songEndFunc == "function"){ + //create a slight pause in execution to allow the browser + //to update the display. + setTimeout(songEndFunc, 50); + } } function getTrackInfo(song){