materialize icon indicating copy to clipboard operation
materialize copied to clipboard

`data-stoppropagation` doesn't work on buttons under dropdown in collapsible

Open vpezeshkian opened this issue 10 years ago • 7 comments

On collapsible header we can now put data-stoppropagation='true' in order to prevent open/close of the collapsible body, cool.

But it fails when you click on any button inside dropdown which the launcher is on collapsible header. See screenshots:

-- layout is collapsible header that has more option button (sc1) -- more option open a drop down without closing the collapsible (cool thanks to data-stoppropagation) (sc1) -- but when I click any of the buttons inside drop down it closes the collapsible (sc2)

sc1

sc2

Any way to prevent this to happen?

vpezeshkian avatar Aug 05 '16 20:08 vpezeshkian

I'm having this issue too

jenwebb avatar Aug 06 '16 03:08 jenwebb

Can you post some example code?

acburst avatar Aug 06 '16 20:08 acburst

<li key={i} className='collapsibleLayout white'>
<div className='collapsible-header'>
<a className='dropdown-button btn-floating waves-effect waves-teal transparent z-depth-0'
             data-activates={`layoutOptions${i}`}
             data-constrainwidth='false'
             data-alignment='left'
             data-stoppropagation='true'
             style={Styles.layoutOptionsIcon}>
            <i className='material-icons small grey-text text-darken-4' style={{position: 'relative', left: '3px', bottom: '2px'}}>more_vert</i>
          </a>
<ul id={`layoutOptions${i}`} className='dropdown-content'>
            <li>
              <a className='grey-text text-darken-4' onClick={::this.activateLayout}>
                Active
                <i className='material-icons right' style={isActive ? {visibility: 'visible'} : {visibility: 'hidden'}}>done</i>
              </a>
            </li>
</ul>
</div>
</li>

When I click on "Active"  which is under dropdown it closes the collapsible... no need to mention that each `<li>` goes under `<ul ref='layoutCollapsible' className='collapsible' `... This is a React application.

vpezeshkian avatar Aug 08 '16 15:08 vpezeshkian

Any suggestions??? here is small screen recording to demonstrate the issue... Please provide feedback...

demo1.zip

vpezeshkian avatar Aug 09 '16 17:08 vpezeshkian

Questions just piles up on each other with no answers

vpezeshkian avatar Aug 11 '16 16:08 vpezeshkian

@vpezeshkian Could you check if this is still an issue with the latest version? also, please provide a way to reproduce it. like a codepen

fega avatar Apr 13 '17 13:04 fega

This option has been removed in v1-dev

Dogfalo avatar Oct 04 '17 23:10 Dogfalo