mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user