fixed the affix bug on mobile devices