I followed this example from the KO binding documentation article click here :
<div data-bind="click: myDivHandler">
<button data-bind="click: myButtonHandler, clickBubble: false">
Click me
</button>
</div>
And my code looks like this:
<tr role="row" data-bind="click: 'True' === 'True' ? ($root.BrowsingCatalog() ? $root.viewProduct : $root.showProduct) : $root.showProduct">
<td class="col-sm-1" data-bind="visible: 'True' == 'True' ? !$root.BrowsingCatalog() : true">
<div class="btn-group">
<button type="button" data-bind="clickBubble: false" class="btn btn-round dropdown-toggle " aria-expanded="false">
<span class="fa fa-caret-down"></span>
</button>
</div>
</td>
</tr>
And when I click the button button, the event is fired from tr. What am I missing?
source
share