details: https://code.tryton.org/tryton/commit/a492506a3aca
branch: 7.0
user: Nicolas Évrard <[email protected]>
date: Wed Sep 23 17:59:29 2026 +0200
description:
Use a minimal size of 2 for the select tag of MultiSelection widgets
Browsers based on Chromium renders the select as a "normal" select tag
when
size=1. Such that the mousedown event is triggered twice which clear the
selection.
Closes #14529
(grafted from 4d95b908a33d950d24416b53d6264db1b0b3b443)
diffstat:
sao/src/view/form.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r c2c25b934f3b -r a492506a3aca sao/src/view/form.js
--- a/sao/src/view/form.js Tue Apr 28 19:28:46 2026 +0200
+++ b/sao/src/view/form.js Wed Sep 23 17:59:29 2026 +0200
@@ -4471,7 +4471,9 @@
yexpand = this.expand;
}
if (!yexpand) {
- this.select.prop('size', this.select.children().length);
+ this.select.prop(
+ 'size', Math.max(2, this.select.children().length));
+
}
if (!field) {
return;