Vue: Prevent event propagating to children

Created on 26 Apr 2016  ·  1Comment  ·  Source: vuejs/vue

hi again all , how would i prevent an event from propagation to children ie only listen on parent as in below prevent @dragstart="dragnewcompont" from propagating to child <extend-popover :formtemplate="gettemplatedata" ></extend-popover>

<div class="form-group" draggable="true" @dragstart="dragnewcompont">
        <label class="col-sm-2"  @click="$broadcast('popupevent')" for="{{ randomid }}">{{ form.inputlabel }}</label>
        <div class="col-sm-10 popovercont">
           <button @click.prevent class="btn btn-{{ form.buttontype }}" > {{ form.buttonname }}</button>
        </div>
        <extend-popover :formtemplate="gettemplatedata" ></extend-popover>
      </div>

have tried .stop as i cant use .prevent since am listening to html5 drag events in mycase

Most helpful comment

was solved by prevent drag events with .prevent.stop

>All comments

was solved by prevent drag events with .prevent.stop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bfis picture bfis  ·  3Comments

franciscolourenco picture franciscolourenco  ·  3Comments

loki0609 picture loki0609  ·  3Comments

lmnsg picture lmnsg  ·  3Comments

paceband picture paceband  ·  3Comments