fix the bug that unexpected display of carousel happens when the orientation of mobile phone changes