From ea2d4417e1461d4dcc1a9d721f9491050325dd73 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 8 Jul 2024 15:52:02 -0400 Subject: [PATCH] RTL: Add direction-aware arrow key utilities We need these all over the place. --- chrome/content/zotero/xpcom/intl.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/xpcom/intl.js b/chrome/content/zotero/xpcom/intl.js index 1264692111..5e69c263df 100644 --- a/chrome/content/zotero/xpcom/intl.js +++ b/chrome/content/zotero/xpcom/intl.js @@ -75,6 +75,8 @@ Zotero.Intl = new function () { // Set the locale direction to Zotero.dir Zotero.dir = Zotero.Locale.defaultScriptDirection(Zotero.locale); Zotero.rtl = (Zotero.dir === 'rtl'); + Zotero.arrowPreviousKey = Zotero.rtl ? 'ArrowRight' : 'ArrowLeft'; + Zotero.arrowNextKey = Zotero.rtl ? 'ArrowLeft' : 'ArrowRight'; this.strings = {}; const intlFiles = ['zotero.dtd', 'preferences.dtd', 'mozilla/editMenuOverlay.dtd'];