diff --git a/src/js/dictionaryManagement.js b/src/js/dictionaryManagement.js index 800b60d..aeebc14 100644 --- a/src/js/dictionaryManagement.js +++ b/src/js/dictionaryManagement.js @@ -54,7 +54,13 @@ export function saveEditModal() { const updatedDictionary = cloneObject(window.currentDictionary); delete updatedDictionary.words; updatedDictionary.name = removeTags(document.getElementById('editName').value.trim()); + if (updatedDictionary.name.length < 1) { + updatedDictionary.name = window.currentDictionary.name; + } updatedDictionary.specification = removeTags(document.getElementById('editSpecification').value.trim()); + if (updatedDictionary.specification.length < 1) { + updatedDictionary.specification = window.currentDictionary.specification; + } updatedDictionary.description = removeTags(document.getElementById('editDescription').value.trim()); updatedDictionary.partsOfSpeech = document.getElementById('editPartsOfSpeech').value.split(',').map(val => val.trim()).filter(val => val !== ''); updatedDictionary.alphabeticalOrder = document.getElementById('editAlphabeticalOrder').value.split(' ').map(val => val.trim()).filter(val => val !== ''); diff --git a/src/scss/_structure.scss b/src/scss/_structure.scss index 983a34a..c9598dd 100644 --- a/src/scss/_structure.scss +++ b/src/scss/_structure.scss @@ -279,7 +279,7 @@ $nav-font-height: 16px; #editDescription { width: 100%; - height: 280px; + height: 240px; } } diff --git a/src/scss/mobile/_structure.scss b/src/scss/mobile/_structure.scss index 5b6f7c5..0e85f26 100644 --- a/src/scss/mobile/_structure.scss +++ b/src/scss/mobile/_structure.scss @@ -89,7 +89,7 @@ $mobile-word-form-size: 32px; } #editDescription { width: 100%; - height: 260px; + height: 220px; } } diff --git a/template-index.html b/template-index.html index 21a3667..2ce61dd 100644 --- a/template-index.html +++ b/template-index.html @@ -245,9 +245,11 @@