mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-23 00:06:18 -04:00
Revert "fix textarea for sending messages is not editable on some iOS devices (#163)"
This reverts commit 1669fe7d75
.
This commit is contained in:
parent
d46f57d8ec
commit
38a80d2d34
6 changed files with 12 additions and 10 deletions
|
@ -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('.textarea');
|
||||
this.$text = this.$el.querySelector('#text-input');
|
||||
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.value || this.$text.value === "\n";
|
||||
return !this.$text.innerText || this.$text.innerText === "\n";
|
||||
}
|
||||
|
||||
_onChange(e) {
|
||||
|
@ -1769,6 +1769,7 @@ class SendTextDialog extends Dialog {
|
|||
const range = document.createRange();
|
||||
const sel = window.getSelection();
|
||||
|
||||
this.$text.focus();
|
||||
range.selectNodeContents(this.$text);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
|
@ -1782,7 +1783,7 @@ class SendTextDialog extends Dialog {
|
|||
_send() {
|
||||
Events.fire('send-text', {
|
||||
to: this.correspondingPeerId,
|
||||
text: this.$text.value
|
||||
text: this.$text.innerText
|
||||
});
|
||||
this.$text.value = "";
|
||||
this.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue