I have modify code as below , But seems not really fixed.
It only fix Y problem but X still have some problem when place popup list in left side or right side
It could be reproduce as below:
UIRoot : Scaling Style = ConstainedOnMobiles
Content With = 1280
Content Height =720
And put Popup list in right side or left side (reference as attach image)
Unity 4.5.5f1
NGUI 3.7.6p2
Yeah, just flip the y.
min = t.localPosition;
max.x = min.x + mBackground.width;
max.y = min.y - mBackground.height; // <-- minus instead of plus
max.z = min.z;
Vector3 offset = mPanel.CalculateConstrainOffset(min, max);
t.localPosition += offset;