[FIX] web_editor: discard background positioning when clicking outside
Since [1] options could still be used while a background positioning overlay was opened. After this commit the overlay is deactivated whenever an element outside of it is clicked - as initially intended. [1] https://github.com/odoo/odoo/commit/dfd98f49e7f2ab5c94dcae3af2d14750d301fa0a task-2735690 closes odoo/odoo#82824 X-original-commit: 574ae49acb950d99ef4ab2b0504cfd7f39bca406 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -6773,7 +6773,7 @@ registry.BackgroundPosition = SnippetOptionWidget.extend({
|
||||
* @private
|
||||
*/
|
||||
_onDocumentClicked: function (ev) {
|
||||
if (!$(ev.target).closest('.o_we_background_position_overlay')) {
|
||||
if (!$(ev.target).closest('.o_we_background_position_overlay').length) {
|
||||
this._toggleBgOverlay(false);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user