This should work
https://codesandbox.io/s/vn96m0o6l
Problem is that double click is still click. So it first triggers click handler than double click. That is why i set timeout of 200ms on click handler.
Double click handler also passes isDoubleClick flag so that handler knows what to do. And in handler based on that and class not existing yet decides which action to do. When click handler gets activated, element already has class and just ignores it.
Could be better, but will fix problem
How to sort the array of json data having letters and digits? JS: function sortOn(property) { return function (a, b) { if (a[property] < b[property]) { return -...
How to sort the array of json data having letters and digits? JS: function sortOn(property) { return function (a, b) { if (a[property] < b[property]) { return -...
I am trying to write a debounce function in typescript, but am unsure of what type to set a variable that is assigned to setTimeout. My code looks like this: function debounced(func: () => void, ...
I am trying to write a debounce function in typescript, but am unsure of what type to set a variable that is assigned to setTimeout. My code looks like this: function debounced(func: () => void, ...
Is it possible to manually set the submitted state to true/false in Angular 6? I can markAsPristine and form.reset(), but these don't have an affect on the submitted state... The form lives in a ...
Is it possible to manually set the submitted state to true/false in Angular 6? I can markAsPristine and form.reset(), but these don't have an affect on the submitted state... The form lives in a ...
<button class="user_badge" mat-raised-button color="primary" matBadge="1000" matBadgePosition="after" matBadgeColor="accent" MatBadgeSize="large"> <mat-icon>person</mat-icon> ...
<button class="user_badge" mat-raised-button color="primary" matBadge="1000" matBadgePosition="after" matBadgeColor="accent" MatBadgeSize="large"> <mat-icon>person</mat-icon> ...