From 92f2296d2b3d5710e6a1f34a9667c6b53ce16ff6 Mon Sep 17 00:00:00 2001 From: btangmu Date: Wed, 26 Jun 2024 13:39:55 -0400 Subject: [PATCH 1/2] CLDR-17759 Clicking cell should select even if Info Panel is hidden -Call updateCurrentId and setLastShown directly from listen if Info Panel is hidden -This is a work-around; the selection should be independent of Info Panel and cldrInfo as stated in new comment --- tools/cldr-apps/js/src/esm/cldrInfo.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cldr-apps/js/src/esm/cldrInfo.mjs b/tools/cldr-apps/js/src/esm/cldrInfo.mjs index 2fc24aab29e..e3fb1a3f70d 100644 --- a/tools/cldr-apps/js/src/esm/cldrInfo.mjs +++ b/tools/cldr-apps/js/src/esm/cldrInfo.mjs @@ -189,6 +189,14 @@ function listen(str, tr, theObj, fn) { cldrDom.listenFor(theObj, "click", function (e) { if (panelShouldBeShown()) { show(str, tr, theObj /* hideIfLast */, fn); + } else if (tr?.sethash) { + // These methods, updateCurrentId and setLastShown may be called from show(), if + // panelShouldBeShown() returned true. If the Info Panel is hidden then they still + // need to be called. Since they don't involve the Info Panel, the implementation + // should be changed to make them independent of the Info Panel and they should be + // called from a different module, not cldrInfo. + cldrLoad.updateCurrentId(tr.sethash); + setLastShown(theObj); } cldrEvent.stopPropagation(e); return false; From a57b39eae7f3439b8a17cf9b3dc417a4e6d0ff2f Mon Sep 17 00:00:00 2001 From: btangmu Date: Thu, 27 Jun 2024 11:18:17 -0400 Subject: [PATCH 2/2] CLDR-17759 Clicking cell should select even if Info Panel is hidden -Remove unused export for openPanel, called only locally --- tools/cldr-apps/js/src/esm/cldrInfo.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/cldr-apps/js/src/esm/cldrInfo.mjs b/tools/cldr-apps/js/src/esm/cldrInfo.mjs index e3fb1a3f70d..9d107b6209a 100644 --- a/tools/cldr-apps/js/src/esm/cldrInfo.mjs +++ b/tools/cldr-apps/js/src/esm/cldrInfo.mjs @@ -1017,7 +1017,6 @@ export { closePanel, initialize, listen, - openPanel, reset, showItemInfoFn, showMessage,