fix textarea.select
textarea.select(); ==> (ios support) textarea.focus(); textarea.setSelectionRange(0, textarea.value.length);
This commit is contained in:
parent
2273315f93
commit
e69f248ea2
@ -199,7 +199,8 @@ var copyMap = new Vue({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
pout.select();
|
pout.focus();
|
||||||
|
pout.setSelectionRange(0, pout.value.length);
|
||||||
document.execCommand("Copy");
|
document.execCommand("Copy");
|
||||||
tip.whichShow = 6;
|
tip.whichShow = 6;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@ -568,7 +568,8 @@ utils.prototype.copy = function (data) {
|
|||||||
textArea.style.background = 'transparent';
|
textArea.style.background = 'transparent';
|
||||||
textArea.value = data;
|
textArea.value = data;
|
||||||
document.body.appendChild(textArea);
|
document.body.appendChild(textArea);
|
||||||
textArea.select();
|
textArea.focus();
|
||||||
|
textArea.setSelectionRange(0, textArea.value.length);
|
||||||
var successful = false;
|
var successful = false;
|
||||||
try {
|
try {
|
||||||
successful = document.execCommand('copy');
|
successful = document.execCommand('copy');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user