fix swap lang

This commit is contained in:
dingedi 2022-10-02 14:40:25 +02:00
parent eb0df4d0df
commit b833608f5c
No known key found for this signature in database
GPG key ID: EE23A12D271A3CED

View file

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