onClick the same text for different buttons

because you’re assigning the variable “fullText” to both of them. If you have 2 different texts, you need 2 different variables.
In the beginning of the code, write:

 let fullText1, fullText2;
let shortText1, shortText2;

Then when you assign the full text use:

fullText1 = $w("#textbox1").text;
fullText2 = $w("#textbox2").text;
shortText1 = fullText1.substr(0, shortTextLength) + "...";
shortText2 = fullText2.substr(0, shortTextLength) + "...";