Merge pull request #458 from SethFalco/fix-437

fix: don't update url after character-limit
This commit is contained in:
Piero Toffanin 2023-07-08 14:52:07 +02:00 committed by GitHub
commit dcc821bc3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 21 deletions

View file

@ -108,10 +108,6 @@ document.addEventListener('DOMContentLoaded', function(){
}
}
if (this.charactersLimit !== -1 && this.inputText.length >= this.charactersLimit){
this.inputText = this.inputText.substring(0, this.charactersLimit);
}
// Update "selected" attribute (to overcome a vue.js limitation)
// but properly display checkmarks on supported browsers.
// Also change the <select> width value depending on the <option> length

View file

@ -206,7 +206,7 @@
<label for="textarea1" class="sr-only">
{{ _h("Text to translate") }}
</label>
<textarea id="textarea1" v-model="inputText" @input="handleInput" ref="inputTextarea" dir="auto"></textarea>
<textarea id="textarea1" :maxLength="charactersLimit" v-model="inputText" @input="handleInput" ref="inputTextarea" dir="auto"></textarea>
<button class="btn-delete-text" title="{{ _h('Delete text') }}" aria-label="{{ _h('Delete text') }}" aria-label="Delete text" @click="deleteText">
<i class="material-icons">close</i>
</button>