mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Set property instead of set attribute
This commit resolves an issue with Safari not properly selecting an `<option>`. Closes #17866. PR #19024.
This commit is contained in:
parent
e68cf87f05
commit
c4ed40b82f
@ -173,7 +173,7 @@ window.qBittorrent.PropFiles = (function() {
|
||||
elem.set('value', priority.toString());
|
||||
elem.set('html', html);
|
||||
if (selected)
|
||||
elem.setAttribute('selected', '');
|
||||
elem.selected = true;
|
||||
return elem;
|
||||
};
|
||||
|
||||
@ -210,9 +210,9 @@ window.qBittorrent.PropFiles = (function() {
|
||||
for (let i = 0; i < options.length; ++i) {
|
||||
const option = options[i];
|
||||
if (parseInt(option.value) === priority)
|
||||
option.setAttribute('selected', '');
|
||||
option.selected = true;
|
||||
else
|
||||
option.removeAttribute('selected');
|
||||
option.selected = false;
|
||||
}
|
||||
|
||||
combobox.value = priority;
|
||||
|
@ -191,10 +191,10 @@
|
||||
const init = () => {
|
||||
$('logLevelSelect').getElements('option').each((x) => {
|
||||
if (selectedLogLevels.indexOf(x.value.toString()) !== -1) {
|
||||
x.setAttribute('selected', '');
|
||||
x.selected = true;
|
||||
}
|
||||
else {
|
||||
x.removeAttribute('selected');
|
||||
x.selected = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1887,7 +1887,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
index = 2;
|
||||
break;
|
||||
}
|
||||
$('contentlayout_select').getChildren('option')[index].setAttribute('selected', '');
|
||||
$('contentlayout_select').getChildren('option')[index].selected = true;
|
||||
$('addToTopOfQueueCheckbox').setProperty('checked', pref.add_to_top_of_queue);
|
||||
$('dontstartdownloads_checkbox').setProperty('checked', pref.start_paused_enabled);
|
||||
switch (pref.torrent_stop_condition) {
|
||||
@ -1901,7 +1901,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
index = 2;
|
||||
break;
|
||||
}
|
||||
$('stopConditionSelect').getChildren('option')[index].setAttribute('selected', '');
|
||||
$('stopConditionSelect').getChildren('option')[index].selected = true;
|
||||
$('deletetorrentfileafter_checkbox').setProperty('checked', pref.auto_delete_mode);
|
||||
|
||||
$('preallocateall_checkbox').setProperty('checked', pref.preallocate_all);
|
||||
@ -2072,7 +2072,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
$('pex_checkbox').setProperty('checked', pref.pex);
|
||||
$('lsd_checkbox').setProperty('checked', pref.lsd);
|
||||
const encryption = pref.encryption.toInt();
|
||||
$('encryption_select').getChildren('option')[encryption].setAttribute('selected', '');
|
||||
$('encryption_select').getChildren('option')[encryption].selected = true;
|
||||
$('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode);
|
||||
|
||||
$('maxActiveCheckingTorrents').setProperty('value', pref.max_active_checking_torrents);
|
||||
@ -2111,7 +2111,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
maxRatioAct = 2;
|
||||
break;
|
||||
}
|
||||
$('max_ratio_act').getChildren('option')[maxRatioAct].setAttribute('selected', '');
|
||||
$('max_ratio_act').getChildren('option')[maxRatioAct].selected = true;
|
||||
updateMaxRatioTimeEnabled();
|
||||
|
||||
// Add trackers
|
||||
|
Loading…
Reference in New Issue
Block a user