Save scroll before applying word edit so it doesn't take you to the top after editing.

This commit is contained in:
Robbie Antenesse 2016-07-10 22:53:21 -06:00
parent d623009b63
commit ca97409b44
1 changed files with 34 additions and 32 deletions

View File

@ -159,6 +159,8 @@ function EditWord(indexString) {
}
function UpdateWord(wordIndex, word, pronunciation, partOfSpeech, simpleDefinition, longDefinition) {
SaveScroll();
currentDictionary.words[wordIndex].name = word;
currentDictionary.words[wordIndex].pronunciation = pronunciation;
currentDictionary.words[wordIndex].partOfSpeech = ((partOfSpeech.length > 0) ? partOfSpeech : " ");