Bug 501413 - In a right-to-left localization, clicking any url in the bookmark sidebar doesn't work; r=mak77

This commit is contained in:
Ehsan Akhgari 2009-07-01 01:17:13 -07:00
parent 0f1e6d47dc
commit 85241a390a

View File

@ -55,7 +55,16 @@ var SidebarUtils = {
var x = { }, y = { }, w = { }, h = { };
tbo.getCoordsForCellItem(row.value, col.value, "image",
x, y, w, h);
mouseInGutter = aEvent.clientX < x.value;
// getCoordsForCellItem returns the x coordinate in logical coordinates
// (i.e., starting from the left and right sides in LTR and RTL modes,
// respectively.) Therefore, we make sure to exclude the blank area
// before the tree item icon (that is, to the left or right of it in
// LTR and RTL modes, respectively) from the click target area.
var isRTL = window.getComputedStyle(aTree, null).direction == "rtl";
if (isRTL)
mouseInGutter = aEvent.clientX > x.value;
else
mouseInGutter = aEvent.clientX < x.value;
}
#ifdef XP_MACOSX