Tweak truncated text fields and JavaScript