[FIX] mass_mailing: should not land on top
Before this commit: When the page is expanded and try to add any block with an image, try to change the image using replace button. It lands the user at the top of the page instead of staying image place. After this commit: The user will stay at the image place after clicking on replace button. Task-2753302 closes odoo/odoo#97266 X-original-commit: da4fdd90622b1f6ba2e45e717fcb4fdde09033af Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -108,7 +108,11 @@ const MassMailingFullWidthFormController = FormController.extend({
|
||||
} else {
|
||||
const ref = $iframeDoc.find('#iframe_target')[0];
|
||||
if (ref) {
|
||||
this.$iframe.height(Math.max(ref.scrollHeight + VERTICAL_OFFSET, minHeight));
|
||||
this.$iframe.css({
|
||||
height: this._isFullScreen()
|
||||
? $(window).height()
|
||||
: Math.max(ref.scrollHeight + VERTICAL_OFFSET, minHeight),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -126,7 +130,6 @@ const MassMailingFullWidthFormController = FormController.extend({
|
||||
const isFullscreen = this._isFullScreen();
|
||||
if (isFullscreen) {
|
||||
$sidebar.height(windowHeight);
|
||||
this.$iframe.height(windowHeight);
|
||||
$sidebar.css({
|
||||
top: '',
|
||||
bottom: '',
|
||||
|
||||
Reference in New Issue
Block a user