Ю
Size: a a a
DT
ПЯ
DT
DT
PC
PC
PC
D
$("button[data-copy]").click(function (){Почему-то при выделении (
var myCopyId = $(this).attr("data-copy");
console.log(`btn id = ${myCopyId}`);
if (!isNaN(myCopyId)){
var myField = $(`.field`).find(`input[data-copy='${myCopyId}']`);
console.log(`field id = ${myField.attr("data-copy")}`);
myField.focus();
myField.select();
myField[0].setSelectionRange(0,99999);
document.execCommand("copy");
}
});
setSelectionRange) "убегает" поле:
Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable
как можно пофиксить?R
A
DV
DV
DV