fix(menu): show native tooltip for truncated item labels

Menu labels (e.g. Open Recent paths) overflow with ellipsis but offered
no way to read the full text. Give the label span a title attribute so
the browser shows the whole path on hover.

Fixes #1770
This commit is contained in:
arookieofc
2026-11-06 19:25:15 +08:00
parent fca9d1e08f
commit 0341b697ce
+3 -1
View File
@@ -273,7 +273,9 @@ export function MenuList({ items, onDone, onCloseLevel, autoFocusFirst = true, .
<span className={styles.icon} data-menu-icon={!r.checked && r.icon ? "" : undefined}>
{r.checked ? <Icon name="check" size={13} /> : r.icon ? <Icon name={r.icon} size={14} /> : null}
</span>
<span className={styles.label}>{r.label}</span>
<span className={styles.label} title={r.label}>
{r.label}
</span>
{r.shortcut && <span className={styles.shortcut}>{r.shortcut}</span>}
{hasSub && <Icon name="chevron-right" size={14} className={styles.subArrow} />}
</button>