fix(tags): show full tag value as native tooltip on legacy chip hover#35520
fix(tags): show full tag value as native tooltip on legacy chip hover#35520
Conversation
|
Claude finished @oidacra's task in 1m 27s —— View job PR Review
FindingsThe PR description is inaccurate — this is not a one-liner. The description states "This adds a single The dijit.Tooltip path removes the native title attribute. In node._tagTooltip = new dijit.Tooltip({ ... });
node.removeAttribute("title"); // ← undoes what createTagLink() just setThis means the one-liner in If the intent is a dijit tooltip, the Silent error swallowing in try { e.target._tagTooltip.destroy(); } catch (err) {}Bare Over-engineering. The minimal correct fix is exactly the one-liner the description claims was made. The dijit.Tooltip additions add ~15 lines of lifecycle management, a |
Native browser title tooltip is slow (~1.5s) and visually inconsistent with the rest of the legacy admin. Layer dijit.Tooltip on top — it appears quickly and matches the existing Dojo-styled tooltips. The title attribute remains as a fallback when dijit is unavailable. Refs #35519
Avoid showing both the browser-native and Dojo tooltips at the same time. The title attribute is set first as a fallback; once the dijit.Tooltip widget attaches successfully, remove the native title so only the Dojo tooltip is shown. Refs #35519
Move dijit.Tooltip creation from createTagLink() to addTagLink(), after the chip is inserted into the DOM. Some Dojo versions register hover handlers that behave inconsistently when connectId points at an unattached node, which would silently break the tooltip while the native title was already removed. The native title is now a real fallback: it is set in createTagLink() and only removed when the dijit.Tooltip widget attaches successfully. On constructor failure the catch logs a warning instead of failing silently. Refs #35519
…ve-no-tooltip-when
…ve-no-tooltip-when
…ve-no-tooltip-when
Summary
In the legacy (DOJO) Edit Content screen, tag chips (
<a class=\"tagLink\">) were rendered without atitleattribute. When the chip got visually clipped by the surrounding container, users had no way to see the full tag value short of removing and re-adding the tag.This adds a single
node.title = tagsMap[tagVelocityVarName][tagId].title;assignment insidecreateTagLink(). The browser now renders a native tooltip with the full value on hover, regardless of whether the chip is truncated.createTagLink()is the sole factory for chip elements, so the same one-line change covers the suggestion-dropdown path, thefillExistingTags()page-load path, and persona tags.Old Edit Content
Closes #35519
Acceptance Criteria
titleattribute)createTagLink()code pathfillExistingTags()on page load receive the tooltip×close affordance, and CSS classes unchangedTest Plan
This is a legacy DOJO static JS file with no associated automated test harness. Manual verification:
a really really really long tag value). Save and reopen.×close affordance still renders correctly.Changed Files
dotCMS/src/main/webapp/html/js/tag.js— one-line addition increateTagLink()Visual Changes
No visible layout changes. Behavioral change is the addition of a native browser tooltip on hover.