Skip to content

Commit

Permalink
Fixed issue with chart events not being cleared after destroy. Closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
highslide-software committed Aug 5, 2010
1 parent 79fa7c1 commit cdefde8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/highcharts.src.js
Expand Up @@ -277,9 +277,13 @@ if (!globalAdapter && win.jQuery) {
* @param {Function} handler The function to remove
*/
removeEvent = function(el, eventType, handler) {
try { // http://forum.jquery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jquery-1-4-2
jQ(el).unbind(eventType, handler);
} catch (e) {}
// workaround for jQuery issue with unbinding custom events:
// http://forum.jquery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jquery-1-4-2
if (document.removeEventListener && !el.removeEventListener) {
el.removeEventListener = function() {};
}

jQ(el).unbind(eventType, handler);
};

fireEvent = function(el, type, eventArguments, defaultFunction) {
Expand Down

0 comments on commit cdefde8

Please sign in to comment.