mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 12:30:42 +02:00
[ticket/12342] Use prop() instead of attr() for boolean properties
PHPBB3-12342
This commit is contained in:
@@ -431,14 +431,14 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
|
||||
if ($("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option").size() === 1) {
|
||||
// If there is only one timezone for the selected date, we just select that automatically.
|
||||
$("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").attr('selected', true);
|
||||
$("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").prop('selected', true);
|
||||
keepSelection = true;
|
||||
}
|
||||
|
||||
if (typeof keepSelection !== 'undefined' && !keepSelection) {
|
||||
var timezoneOptions = $('#timezone > optgroup option');
|
||||
if (timezoneOptions.filter(':selected').length <= 0) {
|
||||
timezoneOptions.filter(':first').attr('selected', true);
|
||||
timezoneOptions.filter(':first').prop('selected', true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user