Merge pull request #326 from dingedi/feature/swap-langs-fix

fix swap lang
This commit is contained in:
Dingedi 2022-10-02 14:43:11 +02:00 committed by GitHub
commit e68ec8411d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,7 +166,7 @@ document.addEventListener('DOMContentLoaded', function(){
this.targetLang = t;
this.inputText = this.translatedText;
this.translatedText = "";
this.handleInput();
this.handleInput(e);
},
dismissError: function(){
this.error = '';
@ -269,9 +269,10 @@ document.addEventListener('DOMContentLoaded', function(){
this.isSuggesting = true;
},
closeSuggestTranslation: function(e) {
this.translatedText = this.savedTanslatedText
if(this.isSuggesting) {
e.preventDefault();
this.translatedText = this.savedTanslatedText
}
this.isSuggesting = false;
},