box / box/box-ui-elements

Menu didn't recognize MenuItem if MenuItem is wrapped by Tooltip

Open
#2,009 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
551
Forks
351
Avg merge
5d 9h
Merged PRs (30d)
31

Description

Please fill out the following template so we can reproduce and fix your issue as quickly as possible!

**Note:** if your issue includes a potential security vulnerability, please do not file it here. Instead, email the issue to security@box.com for support.

**Note:** if your issue involves previewing files, please report the issue [here](https://github.com/box/box-content-preview/issues/new/choose).

**Environment:**
All environment

- Elements version:
v12.0.0-beta.25
work around in v12.0.0-beta.26

**Desktop (please complete the following information):**
all

- OS: [e.g. Windows 10]
all

- Browser [e.g. chrome, safari]
all

- Version [e.g. 22]
all

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Steps to reproduce the problem:**
revert a0730df8aab84c14369b1aa2a25a89b95b312277, then go to preview page, click the open to open dropdown and then click one of the menu item.

**What is the expected behavior? (Screenshots can be helpful here)**
The drop down should close and new tab opened when menu item is clicked.

**What went wrong? (Screenshots, console logs, or HAR files can be helpful here)**
Drop down didn't close though new tab opened when menu item is clicked

**Link to application or sample code:**
There is coupling of logic between Menu and MenuItem. When we add tooltip to wrap MenuItem using Tether, Menu will not be able to recognize the MenuItem. The PR was created to fix it but potential coupling issue exists. see: https://github.com/box/box-ui-elements/commit/a0730df8aab84c14369b1aa2a25a89b95b312277

**If relevant, link to file (or attach file here)**

**Expected behavior**
A clear and concise description of what you expected to happen.
When wrap tooltip around MenuItem, click of the MenuItem will launch the action but MenuItem will not be closed as Menu didn't recognize that the MenuItem is closed.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.