Event bubbling issue in for checkbox click event

282
March 09, 2017, at 00:21 AM

I have checkboxes and it has ng-click to do some operation. The issue on Firefox is that the click event gets called twice. My code was earlier

element.click()

After modifying the code to below:

element.click(function (event) {
    event.stopPropagation();
});

It started working in Firefox. But it stopped working on all other browsers :(

My html control

<input class="ad-ComponentListItem-checkBox" tabindex="-1"       id="AD.CPane.ComponentListItem.{{componentType}}.{{component.id}}.Checkbox" type="checkbox"
                ng-model="component.isAddedToApp" value="{{component.id}}"
                ng-click="componentListController.HandleComponentListSelection(component)" do-action-on-select/>

do-action-on-select directive calls the element.click()

Any help what goes wrong here?

Answer 1

It could be issue with the version of angular you are using. Try to Change the angular version you are using so may be it will help.

Or go check it to prevent double click

Preventing multiple clicks in angularjs

READ ALSO
How to add jQuery UI&#39;s datepicker to a Liferay 7 portlet?

How to add jQuery UI's datepicker to a Liferay 7 portlet?

I'm trying to add jQuery UI's datepicker to my Liferay 7 portlet, yet I keep getting this error:

525
Asp .net core how to load html file byte[] to iframe src view

Asp .net core how to load html file byte[] to iframe src view

I'm going to loadhtml file (byte[]) from my database to < iframe src="" id='chgit'> html element

267
jQuery Array Undefined Error

jQuery Array Undefined Error

I have been wrecking my brains trying to figure out why I get an undefined error for the array statusIdValues when I hit the first push in the code belowIts initialised in a ready function and is pushed into when a checkbox state changes

350
Assitance with code for BMI calculator

Assitance with code for BMI calculator

I am having trouble starting an assignment for classWe are instructed to do some code in making a BMI calculator

343