From 83ed2c955be069f2ef8e63318cede6416dd97bf2 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 23 Nov 2012 12:01:56 +0100 Subject: [PATCH] [FIX] mail: event click on compose button on wall for firefox bzr revid: chm@openerp.com-20121123110156-kz32k4871slnlxa4 --- addons/mail/static/src/js/mail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index ba26cc9d580..bb1a8067644 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -585,11 +585,11 @@ openerp.mail = function (session) { */ on_compose_expandable: function (event) { - if ((!this.stay_open || event.type == 'click') && (!this.show_composer || !this.$('textarea:not(.oe_compact)').val().match(/\S+/))) { + if ((!this.stay_open || (event && event.type == 'click')) && (!this.show_composer || !this.$('textarea:not(.oe_compact)').val().match(/\S+/))) { this.show_composer = !this.show_composer || this.stay_open; this.reinit(); } - if (!this.stay_open && this.show_composer && event.type != 'blur') { + if (!this.stay_open && this.show_composer && (!event || event.type != 'blur')) { this.$('textarea:not(.oe_compact):first').focus(); } return true;