details:   https://code.tryton.org/tryton/commit/4d95b908a33d
branch:    default
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
diffstat:

 sao/src/view/form.js |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 6a4cef9afe82 -r 4d95b908a33d sao/src/view/form.js
--- a/sao/src/view/form.js      Thu Sep 03 15:56:17 2026 +0200
+++ b/sao/src/view/form.js      Wed Sep 23 17:59:29 2026 +0200
@@ -4910,7 +4910,8 @@
             var record = this.record;
             var field = this.field;
             this.update_selection(record, field, () => {
-                this.select.prop('size', this.select.children().length);
+                this.select.prop(
+                    'size', Math.max(2, this.select.children().length));
                 if (!field) {
                     return;
                 }

Reply via email to