In rare instances -- though it definitely happens eventually -- the popup panel viewport width is seen as insufficiently wide enough and as a result the popup panel is toggled into vertical-layout mode. The added code uses animation frames to delay the code testing the viewport width. Hopefully this will work.