Bagaimana cara memasukkan teks melalui tombol klik di kursor di kotak teks terbaru yang digunakan? Javascript

let currentInput = $('#text1');
$(document).on('focus', 'textarea', function() {
  currentInput = $(this);
})
Fair Fly