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
This commit is contained in:
Nicolas Évrard
2026-09-23 17:59:29 +02:00
parent 39033df41c
commit 6fbd38e9d5
+2 -1
View File
@@ -4910,7 +4910,8 @@ function eval_pyson(value){
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;
}