[FIX] web_editor: fix HTML/CSS editor resizing bug
Starting on version 16.0, the HTML/CSS editor is very hard to resize. This is due to 16.0 introducing an iframe for the website: as soon as your mouse enters the iframe, the editor loses focus and cannot be resized anymore. This commit fixes that. task-3006138 closes odoo/odoo#120729 X-original-commit: e489abeffc72293544acb18eba23b52ed2224d60 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -338,10 +338,12 @@ var ViewEditor = Widget.extend({
|
||||
function startResizing(e) {
|
||||
refX = e.pageX;
|
||||
resizing = true;
|
||||
document.body.classList.add("o_ace_view_editor_resizing");
|
||||
}
|
||||
function stopResizing() {
|
||||
if (resizing) {
|
||||
resizing = false;
|
||||
document.body.classList.remove("o_ace_view_editor_resizing");
|
||||
|
||||
if (this.errorSession) {
|
||||
// To trigger an update of the error display
|
||||
|
||||
@@ -485,6 +485,10 @@ a.o_underline {
|
||||
}
|
||||
}
|
||||
|
||||
.o_ace_view_editor_resizing iframe {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.o_ace_error_popover {
|
||||
max-width: 40vw;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user