Add resize event listener after image loaded so when user resizes window at initial state, everything is ok.
Fixbug: hitting delete doesn't delete input text when any input box is on focus