[FIX] mail: event click on compose button on wall for firefox

bzr revid: chm@openerp.com-20121123110156-kz32k4871slnlxa4
This commit is contained in:
Christophe Matthieu 2012-11-23 12:01:56 +01:00
parent a0fd0a7233
commit 83ed2c955b
1 changed files with 2 additions and 2 deletions

View File

@ -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;