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

Sidebar closing when clicking inside it #56

Closed
RomkaLTU opened this issue Apr 10, 2019 · 6 comments · Fixed by #81
Closed

Sidebar closing when clicking inside it #56

RomkaLTU opened this issue Apr 10, 2019 · 6 comments · Fixed by #81

Comments

@RomkaLTU
Copy link

It's happening when you click something inside the sidebar, for example trying to clikc on text input ant type something. Text input is inside slot.

<Slide right>
  <div><input type="text"></div>
</Slide>
@jesperholstjh
Copy link

Have a look at #30. The issue is fixed but @mbj36 hasn't merged it to master. We are also waiting for this.

@mbj36
Copy link
Owner

mbj36 commented Oct 15, 2019

It's merged @jesperholstjh

@toyoshima-c-fixer
Copy link

@mbj36
Has it been modified? Looks like it still closes when clicking inside.

@Brice187
Copy link
Contributor

Found the issue in vue-burger-menu.common.js:

if (element && element !== target && !element.contains(target) && e.target.className !== 'bm-menu' && this.isSideBarOpen && !this.disableOutsideClick) {
    this.closeMenu();
}

The condition e.target.className !== 'bm-menu' only checks the class of the top level elements. if these have child elements that do not have "bm-menu", the click is considered "outside"

@gavinhewitt
Copy link

Having the same issue

@Brice187
Copy link
Contributor

Brice187 commented Dec 5, 2019

i fixed it in my PR, have a look or wait for the maintainer to merge the PR ;)

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 a pull request may close this issue.

6 participants