Stop transition if element is outside fo the DOM
Updated build