details: https://code.tryton.org/tryton/commit/eb3e557996f0
branch: default
user: Nicolas Évrard <[email protected]>
date: Mon Feb 02 20:18:18 2026 +0100
description:
Replace jQuery's css by accessing directly the element style
jQuery's css method will call window.getComputedStyle() which will
force style
recomputation and often force a layout reflow (e.g. when dealing with
grid
properties)
diffstat:
sao/src/view/form.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (32 lines):
diff -r 23cedc854f49 -r eb3e557996f0 sao/src/view/form.js
--- a/sao/src/view/form.js Fri Nov 21 16:09:28 2025 +0100
+++ b/sao/src/view/form.js Mon Feb 02 20:18:18 2026 +0100
@@ -731,13 +731,13 @@
e.toggleClass('empty', empty);
};
var col_start, col_end, row_start, row_end;
+ let style;
for (var child of this.el.children()) {
- child = jQuery(child);
- col_start = parseInt(
- child.css('grid-column-start'), 10);
- col_end = parseInt(child.css('grid-column-end'), 10);
- row_start = parseInt(child.css('grid-row-start'), 10);
- row_end = parseInt(child.css('grid-row-end'), 10);
+ style = child.style;
+ col_start = parseInt(style.gridColumnStart, 10);
+ col_end = parseInt(style.gridColumnEnd, 10);
+ row_start = parseInt(style.gridRowStart, 10);
+ row_end = parseInt(style.gridRowEnd, 10);
for (i = col_start; i < col_end; i++) {
cols[i - 1].push(child);
@@ -978,7 +978,7 @@
.find('> .form-container > .form-item')
.children(':not(.tooltip)');
for (const child of children) {
- if (jQuery(child).css('display') != 'none') {
+ if (child.style.display !== 'none') {
to_collapse = false;
break;
}