From 48ae7c412f56b055b2f9ad178bb9d803544ce69e Mon Sep 17 00:00:00 2001 From: Tom Bishop Date: Thu, 27 Jun 2024 15:20:11 -0400 Subject: [PATCH] CLDR-17759 Clicking cell should select even if Info Panel is hidden (#3827) --- tools/cldr-apps/js/src/esm/cldrInfo.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/cldr-apps/js/src/esm/cldrInfo.mjs b/tools/cldr-apps/js/src/esm/cldrInfo.mjs index 2fc24aab29e..9d107b6209a 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; @@ -1009,7 +1017,6 @@ export { closePanel, initialize, listen, - openPanel, reset, showItemInfoFn, showMessage,