elementor / elementor/elementor
🐞 Bug Report: Nav-Menu Submenu Indicators cannot be toggled in collapsible layout => Submenus cannot be closed after opening.
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.6k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 193
Description
### Prerequisites
- [X] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [X] The issue still exists against the latest stable version of Elementor.
### Description
I have been struggling to implement a mobile menu using the elementor pro nav menu widget in collapsible mode for the last two days.
The problem is, the clicks on the sub-menu indicator are handled like a normal click on the link. This leads to the fact that a sub menu cannot be closed again as the second click after expanding the sub menu always activates the link. Even if the click is on the sub-menu indicator.
I did pin down the source of the bug to the fact, that elementor is using the smartmenus option of `subIndicatorsText` to set svgs inside of the `span.sub-arrow` element. The smartmenus libary tries to identify if a click was on the sub-menu indicator in this way:
```javascript
// elementor-pro/assets/lib/smartmenus/jquery.smartmenus.js
// line 489
var subArrowClicked = $(e.target).is('span.sub-arrow')
```
The problem is, elementor places a `
Contributor guide
Assessment
This issue has not been assessed yet.