Skip to content

Commit 44c11ce

Browse files
szhen11wenlingz
authored andcommitted
acrn-config: fix the issue some select boxes disappear after edited
fix the issue: some select boxes disappear unexpectly after edited Tracked-On: #3809 Signed-off-by: Shuang Zheng <shuang.zheng@intel.com> Reviewed-by: Victor Sun <victor.sun@intel.com>
1 parent c7ecdf4 commit 44c11ce

File tree

1 file changed

+4
-0
lines changed
  • misc/acrn-config/config_app/static

1 file changed

+4
-0
lines changed

misc/acrn-config/config_app/static/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ $().ready(function(){
300300
})
301301

302302
$(document).on('click', "button:contains('+')", function() {
303+
if($(this).text() != '+')
304+
return;
303305
var add_vcpu_id = $(this).attr('id');
304306
var id = add_vcpu_id.replace('add_vcpu_', '');
305307
var config_item = $(this).parent().parent();
@@ -315,6 +317,8 @@ $().ready(function(){
315317
});
316318

317319
$(document).on('click', "button:contains('-')", function() {
320+
if($(this).text() != '-')
321+
return;
318322
var config_item = $(this).parent().parent();
319323
config_item.remove();
320324
});

0 commit comments

Comments
 (0)