From 6f4096adadde3328e7be0cf541df6a96c79f80b3 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Fri, 12 Apr 2024 08:45:40 +0000 Subject: [PATCH] * Toggle picker select panel before hidden,bug#45891. --- module/metric/js/common.ui.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/module/metric/js/common.ui.js b/module/metric/js/common.ui.js index 311d22c61cf..337a4898b23 100644 --- a/module/metric/js/common.ui.js +++ b/module/metric/js/common.ui.js @@ -2,9 +2,16 @@ window.addUnit = function(e) { if($(e.target).prop('checked')) { - $('#unitBox').addClass('hidden'); - $('#addUnitBox').removeClass('hidden'); - $("[name^='customUnit']").prop('checked', true); + var $picker = $('#unitBox').find('.picker').zui('picker').$; + if($picker.state.open) $picker.toggle(); + + setTimeout(function() + { + $('#unitBox').addClass('hidden'); + $('#addUnitBox').removeClass('hidden'); + $("[name^='customUnit']").prop('checked', true); + + }, 150); } else {