Stop click propagation from Ember action?

后端 未结 2 723
太阳男子
太阳男子 2021-01-17 09:45

I have this code that when icon-edit span is clicked, it fires an action that opens a modal, however, at the same time, the click propagates to the view below it (personView

相关标签:
2条回答
  • 2021-01-17 10:27

    Also you can add bubbles=false parameter to action tag. See the API documentation for how to configure event propagation.

    0 讨论(0)
  • 2021-01-17 10:35

    Try to modify the action:

    modalOpen: function {
        //code of your action
        return false;    
    }
    

    This worked for me in a similar situation

    0 讨论(0)
提交回复
热议问题