Always put form input inside an input-group to position accesskey

And invert left/right position on RTL.

Closes #14809
(grafted from 7543e85afb49d4663800edf1004de4ec34bbb759)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2026-04-24 16:14:05 +02:00
parent fef30778f9
commit 2aacd43d09
2 changed files with 19 additions and 13 deletions
+11 -10
View File
@@ -238,14 +238,11 @@ html.accesskey {
padding: 0 2px;
position: absolute;
text-transform: uppercase;
margin: 0 -1em;
left: -1em;
right: 0;
z-index: 5;
}
input[accesskey][type="checkbox"]:after {
background-color: initial;
}
*[accesskey] ~ span[data-accesskey] {
float: right;
position: relative;
@@ -259,11 +256,15 @@ html.accesskey {
content: attr(accesskey);
}
input[accesskey][type="checkbox"],
input[accesskey][type="checkbox"],
select[accesskey] {
& ~ span[data-accesskey] {
bottom: 1em;
&[dir="rtl"] {
*[accesskey] ~ span[data-accesskey]:after,
*[accesskey]:after {
left: 0;
right: -1em;
}
*[accesskey] ~ span[data-accesskey] {
float: left;
}
}
}
+8 -3
View File
@@ -2134,11 +2134,13 @@ function eval_pyson(value){
this.el = jQuery('<div/>', {
'class': this.class_
});
this.group = jQuery('<div/>', {
'class': 'input-group input-group-sm'
}).css('width', '100%').appendTo(this.el);
this.select = this.labelled = jQuery('<select/>', {
'class': 'form-control input-sm mousetrap',
'name': attributes.name,
});
this.el.append(this.select);
}).appendTo(this.group);
this.select.change(this.focus_out.bind(this));
Sao.common.selection_mixin.init.call(this);
this.init_selection();
@@ -2239,11 +2241,14 @@ function eval_pyson(value){
this.el = jQuery('<div/>', {
'class': this.class_
});
this.group = jQuery('<div/>', {
'class': 'input-group input-group-sm'
}).css('width', '100%').appendTo(this.el);
this.input = this.labelled = jQuery('<input/>', {
'type': 'checkbox',
'class': 'form-control input-sm mousetrap',
'name': attributes.name,
}).appendTo(this.el);
}).appendTo(this.group);
this.input.change(this.focus_out.bind(this));
this.input.click(function() {
// Dont trigger click if field is readonly as readonly has no