Catch exception thrown by firefox when svg element is not visible