mirror of
				https://github.com/redphx/better-xcloud.git
				synced 2025-10-30 13:34:07 +01:00 
			
		
		
		
	Add "name" property to "select" elements
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 redphx
					redphx