materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Click on the icon in dropdown does not open dropdown menu

Open TetianaP opened this issue 9 years ago • 3 comments

Description

When dropdown trigger is created as a button with icon, click on an icon does not open dropdown menu.

Repro Steps

  1. Create a dropdown structure as described in spec:
 <!-- Dropdown Structure -->
  <ul id='dropdown1' class='dropdown-content'>
    <li><a href="#!">one</a></li>
    <li><a href="#!">two</a></li>
    <li class="divider"></li>
    <li><a href="#!">three</a></li>
    <li><a href="#!"><i class="material-icons">view_module</i>four</a></li>
    <li><a href="#!"><i class="material-icons">cloud</i>five</a></li>
  </ul>
  1. Add dropdown trigger as a button with icon:
<!-- Dropdown Trigger -->
<a class='dropdown-button btn' href='#' data-activates='dropdown1'><i class="material-icons right">arrow_drop_down</i>Drop Me!</a>
  1. Initialize dropdown:
 $('.dropdown-button').dropdown({
      inDuration: 300,
      outDuration: 225,
      constrainWidth: false, // Does not change width of dropdown to that of the activator
      hover: true, // Activate on hover
      gutter: 0, // Spacing from edge
      belowOrigin: false, // Displays dropdown below the button
      alignment: 'left', // Displays dropdown with edge aligned to the left of button
      stopPropagation: false // Stops event propagation
    }
  );
  1. Click on the icon. Expected: dropdown is open Result: nothing happens. Only if you click on Drop Me! text dropdown will be opened.

TetianaP avatar Apr 19 '17 22:04 TetianaP

This should be fixed in v0.98.2

tomscholz avatar Apr 19 '17 22:04 tomscholz

https://github.com/Dogfalo/materialize/issues/4409

tomscholz avatar Apr 19 '17 23:04 tomscholz

@tomscholz Thank you!

TetianaP avatar Apr 20 '17 23:04 TetianaP