This may fix the safari bug since we are only modifying the dom in the resize event handler javascript