mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Add "name" property to "select" elements
This commit is contained in:
parent
cc84e91d1c
commit
2a104cef24
@ -4712,6 +4712,11 @@ class SettingElement {
|
||||
const $control = method(...Array.from(arguments).slice(1));
|
||||
$control.id = `bx_setting_${key}`;
|
||||
|
||||
// Add "name" property to "select" elements
|
||||
if (type === SettingElement.TYPE_OPTIONS || type === SettingElement.TYPE_MULTIPLE_OPTIONS) {
|
||||
$control.name = $control.id;
|
||||
}
|
||||
|
||||
return $control;
|
||||
}
|
||||
}
|
||||
@ -10605,6 +10610,8 @@ function injectSettingsButton($parent) {
|
||||
let selectedValue;
|
||||
|
||||
$control = CE('select', {id: `bx_setting_${settingId}`});
|
||||
$control.name = $control.id;
|
||||
|
||||
$control.addEventListener('change', e => {
|
||||
setPref(settingId, e.target.value);
|
||||
onChange(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user