Sebobo/jquery.smallipop

Smallipops of boxes that are higher than the viewport appear below the viewport

Closed this issue · 4 comments

Maybe the Smallipop could point somewhere to the inside of the targeted element or at the side of it.

Example: http://timurcelikel.com/tmp/smallipop_issue_01/

I think you should use data-smallipop-preferred-position="right" for this extreme case.
I already thought about trying to fit smallipop to the left or right, when top and bottom wouldn't fit. But this would create a too complicated configuration and behaviour.

Isn't it easier to attach the smallipop to an element inside of the huge block?
Maybe some transparent anchor?

hmmm. I'd prefer no transparent anchors, would be much cleaner to have that info directly conntected to the element it belongs to...

In our example we got a box of ~500px height, and ~200px distance to the top, the smallipop is a big higher than 200px so it gets placed beneath, and then cut on browser heights below. I admit it would be also solvable in this case with offset or preferred-position but wouldnt it be nicer to have it relaiable in the viewport? Its hard to always test all screen sizes once you change or add hints. Also, on high screens its nicer beneath...

How about if it would point in the middle of the element instead of the corner – or scroll not only the element in question but also to the smallipop?

Added first version of a fix to the develop branch.
The Smallipop will be moved up until it's completely visible and has some room to the bottom window edge.

Used your example as testing environment.

stays on screen quite insistingly now, thanks!