Reported in https://github.com/wikimedia/jquery.uls/pull/383#pullrequestreview-613761459 Instead of checking the left edge of the trigger, check the midpoint. This is more reliable and does not cause the dialog to incorrectly swap sides in narrow screens in LTR direction, This patch does not touch the compact language links variant. Bug: T276248 Change-Id: Ic734abb7b350852f8c5c10ced8456bf146df62d8