Skip to content
Snippets Groups Projects
Commit 77545387 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port branch 9.0 up to cae18851

parents f20df81c cae18851
No related branches found
No related tags found
No related merge requests found
......@@ -296,6 +296,8 @@ var FieldTextHtml = widget.extend({
var self = this;
this.$el.closest('.modal-body').css('max-height', 'none');
this.$iframe = this.$el.find('iframe');
// deactivate any button to avoid saving a not ready iframe
$('.o_cp_buttons, .o_statusbar_buttons').find('button').addClass('o_disabled').attr('disabled', true);
this.document = null;
this.$body = $();
this.$content = $();
......@@ -321,6 +323,8 @@ var FieldTextHtml = widget.extend({
this.lang = this.lang ? this.lang[1] : this.view.dataset.context.lang;
this._dirty_flag = false;
this.render_value();
// reactivate all the buttons when the field's content (the iframe) is loaded
$('.o_cp_buttons, .o_statusbar_buttons').find('button').removeClass('o_disabled').attr('disabled', false);
setTimeout(function () {
self.add_button();
setTimeout(self.resize,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment