Skip to content

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

@svdvs

Description

@svdvs

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions