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

Document click handler, only apply when needed (Button Dropdowns) #167

Open
svdvs opened this issue Jan 9, 2018 · 0 comments
Open

Document click handler, only apply when needed (Button Dropdowns) #167

svdvs opened this issue Jan 9, 2018 · 0 comments

Comments

@svdvs
Copy link
Contributor

svdvs commented Jan 9, 2018

In rocketbelt.button-dropdown we attach a click handler to the document so we can check if we need to close a currently open dropdown. Ideally this click handler should only be applied when when a button-dropdown element is active/open.

(Line 52)

document.addEventListener('click', function onclick(e) {
      var path = e.path;
      var pathLen = path.length;
      var shouldClose = true;
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

No branches or pull requests

1 participant