You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Scott Talsma <sc...@talsma.tv> on 2014/11/04 18:21:46 UTC

centerPopup not working in RTL layouts

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:

https://github.com/apache/flex-sdk/commit/0e48dac303d93ab406fcc1452d0fcbf1227b60ad
+ 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?
Scott