From 9bb02a6d29e69561c085953b33afd32e84a98639 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 10 May 2010 14:51:04 -0600 Subject: [PATCH] Bug #9010: IE doesn't bubble change events --- imp/js/compose-dimp.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index 36676269f..d973cd478 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -869,7 +869,12 @@ var DimpCompose = { } /* Attach event handlers. */ - document.observe('change', this.changeHandler.bindAsEventListener(this)); + if (Prototype.Browser.IE) { + // IE doesn't bubble change events. + $('identity', 'upload').invoke('observe', 'change', this.changeHandler.bindAsEventListener(this)); + } else { + document.observe('change', this.changeHandler.bindAsEventListener(this)); + } Event.observe(window, 'resize', this.resizeMsgArea.bind(this)); $('compose').observe('submit', Event.stop); $('submit_frame').observe('load', this.attachmentComplete.bind(this)); -- 2.11.0