Skip to content

Commit

Permalink
CLDR-17759 Clicking cell should select even if Info Panel is hidden
Browse files Browse the repository at this point in the history
-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
  • Loading branch information
btangmu committed Jun 26, 2024
1 parent ed980db commit 92f2296
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/cldr-apps/js/src/esm/cldrInfo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 92f2296

Please sign in to comment.