From 6e4383281db26ea0b121f2ce412ffeb775ecdea7 Mon Sep 17 00:00:00 2001 From: Neil Deakin Date: Sun, 5 Dec 2010 17:10:45 -0500 Subject: [PATCH] Bug 606343, part 4, fix arrow position in rtl, r=dao, a=blocking --- toolkit/content/widgets/popup.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.xml index e73f32531e0e..8f33fbd501c4 100644 --- a/toolkit/content/widgets/popup.xml +++ b/toolkit/content/widgets/popup.xml @@ -324,7 +324,9 @@ hideAnchor = true; } else { - arrowbox.pack = popupRect.left + popupRect.width / 2 < anchorRect.left ? "end" : "start"; + let rtl = (window.getComputedStyle(this).direction == "rtl"); + arrowbox.pack = (popupRect.left + popupRect.width / 2 < anchorRect.left) != rtl ? + "end" : "start"; if (vertPos == 1) { container.dir = ""; anchorClass = "top";