flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Talsma <sc...@talsma.tv>
Subject centerPopup not working in RTL layouts
Date Tue, 04 Nov 2014 17:21:46 GMT
I just noticed when I was testing my Arabic builds that all my
centered popup windows were appearing offscreen.

Prior to SDK 4.9, I was compensating for this in a wrapper call to
centerPopup, but after 4.9 was released, I was able to take that code
out.  Basically, it was this:

var isLTR:Boolean = (layoutDirection == LayoutDirection.LTR);
if (!isLTR) {
       popUp.x = -popUp.x - popUp.width;

When I added it back in, my popups center again.

I started looking through the history of PopupMangerImpl, and there is
a commit from May 2013 that looks relevant:

+ if (popUpLDE.layoutDirection == LayoutDirection.RTL)
+ {
+ //Corrects the x offset for RTL.
+ clippingOffset.x += popUpParent.width;
+ }

If I am looking at the dates correctly, 4.10 was release in Aug 2013,
so this issue has been around since then.  I'm surprised that I'm the
only person seeing this behavior.

I'm tempted to recompile agains 4.10, .11, and .12 and see if I get
the same results.

Any opinions?

View raw message