From 8fe49a32359220b67d89e82141f2e27949bc489a Mon Sep 17 00:00:00 2001 From: Fayez Qandeel Date: Fri, 17 Dec 2021 12:51:24 +0100 Subject: [PATCH] [11.0][FIX] Modal window sudden closes Modal window sudden closes when trying to change color via color picker --- web_widget_color/static/src/js/widget.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web_widget_color/static/src/js/widget.js b/web_widget_color/static/src/js/widget.js index 418a53f79..0321d1387 100644 --- a/web_widget_color/static/src/js/widget.js +++ b/web_widget_color/static/src/js/widget.js @@ -16,7 +16,14 @@ odoo.define('web.web_widget_color', function(require) { _renderEdit: function() { this.$input = this.$el.find('input'); - this.jscolor = new jscolor(this.$input[0], {hash:true, zIndex:2000}); + $wrapper = $('
').css('position', 'absolute'); + this.$el.css('position', 'relative'); + this.$el.append($wrapper); + this.jscolor = new jscolor(this.$input[0], { + hash:true, + zIndex:2000, + container: this.$el.find('div:first')[0] + }); }, }); field_registry.add('color', FieldColor);