Skip to content

Commit

Permalink
* Toggle picker select panel before hidden,bug#45891.
Browse files Browse the repository at this point in the history
  • Loading branch information
qixinzhi committed Apr 12, 2024
1 parent 45c17fc commit 6f4096a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions module/metric/js/common.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 6f4096a

Please sign in to comment.