Skip to content

Commit 4b2eb18

Browse files
author
Jessica Wang
committed
CLOUDSTACK-2981: UI - create network offering - fix a bug that provider dropdown always bounced back to the first enabled option. It should only bounce back to the first enabled option when the selected option is disabled.
1 parent 3eeca55 commit 4b2eb18

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎ui/scripts/configuration.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,11 @@
12281228
}
12291229
});
12301230
}
1231-
$providers.each(function() {
1232-
$(this).val($(this).find('option:first'));
1231+
$providers.each(function() {
1232+
//if selected option is disabled, select the first enabled option instead
1233+
if($(this).find('option:selected:disabled').length > 0) {
1234+
$(this).val($(this).find('option:first'));
1235+
}
12331236
});
12341237

12351238

0 commit comments

Comments
 (0)