mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Fix display name not being editable on some older iOS devices (#163)
This commit is contained in:
parent
38a80d2d34
commit
cd669b13d9
4 changed files with 16 additions and 4 deletions
|
@ -1767,7 +1767,6 @@ class SendTextDialog extends Dialog {
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
const sel = window.getSelection();
|
const sel = window.getSelection();
|
||||||
|
|
||||||
this.$text.focus();
|
|
||||||
range.selectNodeContents(this.$text);
|
range.selectNodeContents(this.$text);
|
||||||
sel.removeAllRanges();
|
sel.removeAllRanges();
|
||||||
sel.addRange(range);
|
sel.addRange(range);
|
||||||
|
@ -1783,7 +1782,7 @@ class SendTextDialog extends Dialog {
|
||||||
to: this.correspondingPeerId,
|
to: this.correspondingPeerId,
|
||||||
text: this.$text.innerText
|
text: this.$text.innerText
|
||||||
});
|
});
|
||||||
this.$text.value = "";
|
this.$text.innerText = "";
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1589,3 +1589,10 @@ x-dialog x-paper {
|
||||||
color: black;
|
color: black;
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make elements with attribute contenteditable editable on older iOS devices.
|
||||||
|
See note here: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select */
|
||||||
|
[contenteditable] {
|
||||||
|
-webkit-user-select: text;
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
|
|
|
@ -1769,7 +1769,6 @@ class SendTextDialog extends Dialog {
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
const sel = window.getSelection();
|
const sel = window.getSelection();
|
||||||
|
|
||||||
this.$text.focus();
|
|
||||||
range.selectNodeContents(this.$text);
|
range.selectNodeContents(this.$text);
|
||||||
sel.removeAllRanges();
|
sel.removeAllRanges();
|
||||||
sel.addRange(range);
|
sel.addRange(range);
|
||||||
|
@ -1785,7 +1784,7 @@ class SendTextDialog extends Dialog {
|
||||||
to: this.correspondingPeerId,
|
to: this.correspondingPeerId,
|
||||||
text: this.$text.innerText
|
text: this.$text.innerText
|
||||||
});
|
});
|
||||||
this.$text.value = "";
|
this.$text.innerText = "";
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1619,3 +1619,10 @@ x-dialog x-paper {
|
||||||
color: black;
|
color: black;
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make elements with attribute contenteditable editable on older iOS devices.
|
||||||
|
See note here: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select */
|
||||||
|
[contenteditable] {
|
||||||
|
-webkit-user-select: text;
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue