trailling spaces and resize event