bootstrap-hover-dropdown icon indicating copy to clipboard operation
bootstrap-hover-dropdown copied to clipboard

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

Open redavis opened this issue 10 years ago • 2 comments

…contain data-hover.

  • Issue occurs when nav element contains nested HTML.

redavis avatar Jul 09 '15 22:07 redavis

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.

redavis avatar Jul 09 '15 22:07 redavis

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

lllopo avatar Apr 01 '16 07:04 lllopo