From 84bff82d762f4fad6d2d42920cc85129f45667f2 Mon Sep 17 00:00:00 2001 From: Adrien Dieudonne Date: Fri, 6 Jan 2023 14:30:23 +0000 Subject: [PATCH] [FIX] web, web_editor: ace widget partially hidden in read-only mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the ´.ace_gutter´ overlapped the beginning of the ace widget text content. It only happens in read-only mode if it's a one-liner content. Note that ´aria-hidden´ attribute is not set on BS modal. So, it seems useless to remove it. Maybe a relicate of Bootstrap 3. Steps to reproduce: In debug mode, - Open Settings - Technical - Scheduled Actions - Open any closes odoo/odoo#109519 X-original-commit: dc65d3de3a02a8f196eb22348bdfe41ede23f5d1 Signed-off-by: Romeo Fragomeli (rfr) Signed-off-by: Adrien Dieudonné (adr) --- addons/payment_adyen/__manifest__.py | 1 - addons/payment_adyen/static/src/scss/dropin.scss | 6 ------ .../static/src/js/product_configurator_modal.js | 1 - .../web/static/src/core/debug/profiling/profiling_qweb.js | 1 - addons/web/static/src/legacy/js/core/dialog.js | 1 - addons/web/static/src/legacy/scss/ace.scss | 3 --- addons/web/static/src/legacy/scss/ui.scss | 4 ---- 7 files changed, 17 deletions(-) delete mode 100644 addons/payment_adyen/static/src/scss/dropin.scss diff --git a/addons/payment_adyen/__manifest__.py b/addons/payment_adyen/__manifest__.py index 7aea95b62ef..35aad13ac39 100644 --- a/addons/payment_adyen/__manifest__.py +++ b/addons/payment_adyen/__manifest__.py @@ -19,7 +19,6 @@ 'assets': { 'web.assets_frontend': [ 'payment_adyen/static/src/js/payment_form.js', - 'payment_adyen/static/src/scss/dropin.scss', ], }, 'license': 'LGPL-3', diff --git a/addons/payment_adyen/static/src/scss/dropin.scss b/addons/payment_adyen/static/src/scss/dropin.scss deleted file mode 100644 index 4cfcfe4fb88..00000000000 --- a/addons/payment_adyen/static/src/scss/dropin.scss +++ /dev/null @@ -1,6 +0,0 @@ -.o_adyen_dropin { - [aria-hidden="true"], [aria-hidden="1"] - { - display: block !important; - } -} diff --git a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js index f3a87d141a4..74f79da1613 100644 --- a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js +++ b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js @@ -115,7 +115,6 @@ export const OptionalProductsModal = Dialog.extend(ServicesMixin, VariantMixin, if (!self.preventOpening) { self.$modal.find(".modal-body").replaceWith(self.$el); self.$modal.attr('open', true); - self.$modal.removeAttr("aria-hidden"); self.$modal.appendTo(self.container); const modal = new Modal(self.$modal[0], { focus: true, diff --git a/addons/web/static/src/core/debug/profiling/profiling_qweb.js b/addons/web/static/src/core/debug/profiling/profiling_qweb.js index e2cda99ba92..08e6ffb272e 100644 --- a/addons/web/static/src/core/debug/profiling/profiling_qweb.js +++ b/addons/web/static/src/core/debug/profiling/profiling_qweb.js @@ -135,7 +135,6 @@ export class ProfilingQwebView extends Component { displayIndentGuides: true, showGutter: true, }); - this.aceEditor.renderer.$gutter.removeAttribute("aria-hidden"); this.aceEditor.renderer.$cursorLayer.element.style.display = "none"; this.aceEditor.$blockScrolling = true; diff --git a/addons/web/static/src/legacy/js/core/dialog.js b/addons/web/static/src/legacy/js/core/dialog.js index 823fc317632..efee6c79147 100644 --- a/addons/web/static/src/legacy/js/core/dialog.js +++ b/addons/web/static/src/legacy/js/core/dialog.js @@ -199,7 +199,6 @@ var Dialog = Widget.extend({ } self.$modal.find(".modal-body").replaceWith(self.$el); self.$modal.attr('open', true); - self.$modal.removeAttr("aria-hidden"); if (self.$parentNode) { self.$modal.appendTo(self.$parentNode); } diff --git a/addons/web/static/src/legacy/scss/ace.scss b/addons/web/static/src/legacy/scss/ace.scss index 95adacf494e..811624f1736 100644 --- a/addons/web/static/src/legacy/scss/ace.scss +++ b/addons/web/static/src/legacy/scss/ace.scss @@ -1,6 +1,3 @@ -.ace_editor > .ace_gutter { - display: block !important; // display even with aria-hidden -} .ace_editor .ace_qweb { color: orange !important; } diff --git a/addons/web/static/src/legacy/scss/ui.scss b/addons/web/static/src/legacy/scss/ui.scss index 44c64c48251..67ee39c6ba4 100644 --- a/addons/web/static/src/legacy/scss/ui.scss +++ b/addons/web/static/src/legacy/scss/ui.scss @@ -24,10 +24,6 @@ } } -[aria-hidden="true"], [aria-hidden="1"] { - display: none!important; -} - .dropdown-toggle { white-space: nowrap;