Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8188: Fix breadcrumbs hidden menu (not opening) #1250

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

tischsoic
Copy link
Contributor

🎫 Issue IBX-8188

@@ -41,6 +42,10 @@ const Breadcrumbs = () => {
const toggleHiddenListVisible = useCallback(() => {
setHiddenListVisible(!hiddenListVisible);
}, [setHiddenListVisible, hiddenListVisible]);
const handleTogglerClick = (event) => {
event.stopPropagation();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: we need to stop this propagation because otherwise it may be caught again in hideHiddenMenuOnClickOutside. Also, note that this event is a react event, which may have a different propagation than a standard DOM event.

const hideHiddenMenuOnClickOutside = (event) => {
const { target } = event;

if (hiddenListWrapperRef.current?.contains(target) ?? false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in theory ?? false is unnecessary, I think? as if it does not exist, it's undefined, which is falsy as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to be explicit here so that it will be easier to understand when reading.

@tischsoic tischsoic force-pushed the IBX-8188-fix-breadcrumbs-hidden-menu branch from c524805 to fcde668 Compare April 25, 2024 12:44
Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dew326 dew326 merged commit 7f7e2a7 into 4.6 Apr 26, 2024
22 checks passed
@dew326 dew326 deleted the IBX-8188-fix-breadcrumbs-hidden-menu branch April 26, 2024 05:52
@tischsoic
Copy link
Contributor Author

Merged up:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants