Fixing unintended loop in Firefox when moving iframe