[FIX] web_editor: Image crop option not working
Current behaviour before commit: When pressing crop button, crop widget is not getting opened and 'connection lost' notification is appeared. This happens because in wysiwyg.js file _rpc function does not get the proper arguments from loadImageInfo function. Desired behaviour after commit: Now, _rpc function is removed from wysiwyg.js as it doesn't need anymore and _serviceRpc is passed directly through the props. As result crop option works. task-3546160 closes odoo/odoo#138482 Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
This commit is contained in:
@@ -132,7 +132,7 @@ export class Wysiwyg extends Component {
|
||||
}),
|
||||
}
|
||||
imageCropProps = useState({
|
||||
rpc: this._rpc.bind(this),
|
||||
rpc: this._serviceRpc.bind(this),
|
||||
showCount: 0,
|
||||
media: undefined,
|
||||
mimetype: undefined,
|
||||
@@ -3505,9 +3505,6 @@ export class Wysiwyg extends Component {
|
||||
xhr: settings.xhr,
|
||||
});
|
||||
}
|
||||
_rpc({ route, params }) {
|
||||
return this._serviceRpc(route, params)
|
||||
}
|
||||
}
|
||||
Wysiwyg.activeCollaborationChannelNames = new Set();
|
||||
Wysiwyg.activeWysiwygs = new Set();
|
||||
|
||||
Reference in New Issue
Block a user