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

Transverse up DOM tree and match correct target when object does not … #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

redavis
Copy link
Contributor

@redavis redavis commented Jul 9, 2015

…contain data-hover.

  • Issue occurs when nav element contains nested HTML.

…contain data-hover.

- Issue occurs when nav element contains nested HTML.
@redavis
Copy link
Contributor Author

redavis commented Jul 9, 2015

Cameron,
See the following markup to duplicate issue.

<ul class="list-unstyled">
  <li class="dropdown">
      <a style="display:block" href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="500">
        <div>My Special</div>
        <small>Contextual Menu</small>
      </a>
      <ul class="dropdown-menu">
        <li><a tabindex="-1" href="#">Why Would</a></li>
        <li><a tabindex="-1" href="#">A Home Tab</a></li>
        <li><a tabindex="-1" href="#">Have Dropdowns?</a></li>
      </ul>
    </li>
</ul>

The event may end up being targeted to <div>My Special</div> and stop it from executing.

Let me know if you think there is a better way to deal with this.

@lllopo
Copy link

lllopo commented Apr 1, 2016

Not working for me, similar setup. What I did is :
if(!$parent.hasClass('open') && !$this.is(event.target) && !$.contains($this[0], event.target)) {
on line 50

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.

2 participants