Merge pull request #4033 from aignatov-bio/ai-sci-6740-fix-stock-modal-add-remove-value

Fix stock modal add/remove value preset value [SCI-6740]
This commit is contained in:
aignatov-bio 2022-04-19 13:46:24 +02:00 committed by GitHub
commit 1a2a58ff5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,6 @@ var RepositoryStockValues = (function() {
dropdownSelector.selectValues(UNIT_SELECTOR, $('#initial_units').val());
$('#operator').val($(this).data('operator'));
switch ($(this).data('operator')) {
case 'set':
dropdownSelector.enableSelector(UNIT_SELECTOR);
@ -175,6 +174,7 @@ var RepositoryStockValues = (function() {
});
$manageModal.modal('show');
amountChanged = false;
$('#stock-input-amount').focus();
$('#stock-input-amount')[0].selectionStart = $('#stock-input-amount')[0].value.length;
$('#stock-input-amount')[0].selectionEnd = $('#stock-input-amount')[0].value.length;