Moved touchend and mouseup to window.