mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 16:56:16 -04:00
fix textarea for sending messages is not editable on some iOS devices (#163)
This commit is contained in:
parent
3c1ef57740
commit
1669fe7d75
6 changed files with 10 additions and 12 deletions
|
@ -372,7 +372,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="column fw">
|
||||
<div id="text-input" title="Message" class="textarea" role="textbox" autocapitalize="none" spellcheck="false" autofocus contenteditable></div>
|
||||
<textarea title="Message" class="textarea" wrap="off" autofocus></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-row row-reverse">
|
||||
|
|
|
@ -1726,7 +1726,7 @@ class SendTextDialog extends Dialog {
|
|||
constructor() {
|
||||
super('send-text-dialog');
|
||||
Events.on('text-recipient', e => this._onRecipient(e.detail.peerId, e.detail.deviceName));
|
||||
this.$text = this.$el.querySelector('#text-input');
|
||||
this.$text = this.$el.querySelector('.textarea');
|
||||
this.$peerDisplayName = this.$el.querySelector('.display-name');
|
||||
this.$form = this.$el.querySelector('form');
|
||||
this.$submit = this.$el.querySelector('button[type="submit"]');
|
||||
|
@ -1747,7 +1747,7 @@ class SendTextDialog extends Dialog {
|
|||
}
|
||||
|
||||
_textInputEmpty() {
|
||||
return !this.$text.innerText || this.$text.innerText === "\n";
|
||||
return !this.$text.value || this.$text.value === "\n";
|
||||
}
|
||||
|
||||
_onChange(e) {
|
||||
|
@ -1769,7 +1769,6 @@ class SendTextDialog extends Dialog {
|
|||
const range = document.createRange();
|
||||
const sel = window.getSelection();
|
||||
|
||||
this.$text.focus();
|
||||
range.selectNodeContents(this.$text);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
|
@ -1783,7 +1782,7 @@ class SendTextDialog extends Dialog {
|
|||
_send() {
|
||||
Events.fire('send-text', {
|
||||
to: this.correspondingPeerId,
|
||||
text: this.$text.innerText
|
||||
text: this.$text.value
|
||||
});
|
||||
this.$text.value = "";
|
||||
this.hide();
|
||||
|
|
|
@ -1041,7 +1041,7 @@ x-dialog .dialog-subheader {
|
|||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#text-input {
|
||||
#send-text-dialog .textarea {
|
||||
min-height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue