When pasting text from the clipboard the input is not resized properly