fix scroll detection in firefox