mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Fix for sending chat with ctrl enter for windows chrome/firefox. Fixes https://github.com/HabitRPG/habitica/issues/9380 (#9588)
* testing additional event trigger for sendMessage * moved keyup event to newmessage * added keyup event to tavern vue too * removed obsolete check from _updateCarretPosition * fixed lint issue
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
h3(v-once) {{ $t('tavernChat') }}
|
||||
|
||||
.row
|
||||
textarea(:placeholder="$t('tavernCommunityGuidelinesPlaceholder')", v-model='newMessage', :class='{"user-entry": newMessage}', @keydown='updateCarretPosition')
|
||||
textarea(:placeholder="$t('tavernCommunityGuidelinesPlaceholder')", v-model='newMessage', :class='{"user-entry": newMessage}', @keydown='updateCarretPosition', @keyup.ctrl.enter='sendMessage()')
|
||||
autocomplete(:text='newMessage', v-on:select="selectedAutocomplete", :coords='coords', :chat='group.chat')
|
||||
|
||||
.row
|
||||
@@ -532,11 +532,6 @@ export default {
|
||||
this._updateCarretPosition(eventUpdate);
|
||||
}, 250),
|
||||
_updateCarretPosition (eventUpdate) {
|
||||
if (eventUpdate.metaKey && eventUpdate.keyCode === 13) {
|
||||
this.sendMessage();
|
||||
return;
|
||||
}
|
||||
|
||||
let text = eventUpdate.target;
|
||||
this.getCoord(eventUpdate, text);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user