JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Text Boxes & Inputs › Allow to select text on readonly input › Reply To: Allow to select text on readonly input
Hi Peter,
thank you for your help. As a workaround, I set the “readonly” attribute on the inner “input” element instead of the smart-input:
$("input", smartInput).attr("readonly", "");
Unfortunately, I cannot use the Smart.TextBox
component, because it seems to be very slow to create. When I create 30 text boxes (for a form), they need about 500-600 ms to create (in Chrome), which is way too much. See this code pen link: https://codepen.io/KP-Traeger12/pen/abdadYY
When you change Smart.TextBox to Smart.Input, it only needs ~60 ms (1/10 of the time).
I also noticed an issue with Smart.Input, that when getting the current value by calling .value, it does not always return the current value, but the value from about 0.5 seconds ago. Instead, I have to get the value from the underlying “input” element, similar to setting the “readonly” attribute.
Thank you