diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index a429622b410..e45b53cc6ac 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7604 \ No newline at end of file +7605 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/js/util.js b/mozilla/webtools/bugzilla/js/util.js index 666f2666b30..6dcabbbc91f 100644 --- a/mozilla/webtools/bugzilla/js/util.js +++ b/mozilla/webtools/bugzilla/js/util.js @@ -243,15 +243,16 @@ function bz_optionIndex(aSelect, aValue) { * without the word "on" in front of it. */ function bz_fireEvent(anElement, anEvent) { - // IE - if (document.createEventObject) { + if (document.createEvent) { + // DOM-compliant browser + var evt = document.createEvent("HTMLEvents"); + evt.initEvent(anEvent, true, true); + return !anElement.dispatchEvent(evt); + } else { + // IE var evt = document.createEventObject(); return anElement.fireEvent('on' + anEvent, evt); } - // Firefox, etc. - var evt = document.createEvent("HTMLEvents"); - evt.initEvent(anEvent, true, true); // event type, bubbling, cancelable - return !anElement.dispatchEvent(evt); } /**